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

why is the sollution code for 1001 wrong
Posted by Yeqianqian 2 Sep 2010 14:09
#include <iostream>
#include <iomanip>
#include<math.h>
#include<vector>
using namespace std;
int  main()
{
    cout<<setiosflags(ios::fixed)<<setprecision(4);
    vector<double>v;
    double a;
    for(int i=0;!cin.eof();i++ )
    {
        cin>>a;
        v.push_back(sqrt(a));
    }
    for(int j=v.size()-2;j>=0;j--)
    {cout<<v[j]<<"\n";}
    return 0;
}