ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

HELP
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;
}