Advertisement
erfanul007

Timus 1001

Apr 14th, 2021
700
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #include<stack>
  3. #include<cmath>
  4. using namespace std;
  5. int main()
  6. {
  7.     stack<double>stk;
  8.     unsigned long long x;
  9.     while(scanf("%llu",&x)!=EOF){
  10.     stk.push(x);
  11.     }
  12.     while(!stk.empty()){
  13.  
  14.          cout<<fixed<<setprecision(4)<<sqrt(stk.top())<<endl;
  15.         stk.pop();
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement