|
|
back to boardHELP Posted by Levan 25 Nov 2010 20:37 Why wrong answer??? #include <iostream> #include <cmath> #include <sstream> #include <vector> #include <iomanip> using namespace std; int main() { double ans; string s; vector <double> vect; int i; i=0; while(cin>>s){ stringstream ss; ss<<s; ss>>ans; vect.push_back(sqrt(ans));
} for(int i=vect.size();i>=0;i--) cout<<setprecision(5)<<vect[i]<<endl; return 0; } |
|
|