|
|
back to board1001 solution Posted by Levan 27 Nov 2010 12:30 Here the answer: #include<iostream> #include<vector> #include<cmath> using namespace std; int main(){ double x; vector<double>a; while(cin>>x)a.push_back(sqrt(x)); for(int i=a.size()-1;i>=0;i--)printf("%.4f\n",a[i]); return 0; } Re: 1001 solution Didn't "while(cin>>x)" lead to endless loop? Re: 1001 solution it may.. while(cin>>x==1) |
|
|