Posted on 2008-04-04 22:43
superman 阅读(257)
评论(0) 编辑 收藏 引用 所属分类:
URAL
1 /* Accepted 1.062 3 060 KB */
2 #include <stack>
3 #include <math.h>
4 #include <iostream>
5
6 using namespace std;
7
8 int main()
9 {
10 double n;
11 stack <double> set;
12 while(cin >> n)
13 set.push(n);
14
15 cout.setf(ios_base::showpoint);
16 cout.setf(ios_base::fixed);
17 cout.precision(4);
18
19 while(set.empty() == false)
20 {
21 cout << sqrt(set.top()) << endl;
22 set.pop();
23 }
24
25 return 0;
26 }
27