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

How to stop please HELP me PLEASE (I think it doesn't work) there is Crush
Posted by Erekle Magradze 6 Apr 2007 02:58
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main(){
    long a;
    double b[100000];
    int i=0;
    cin>>a;
    while(a!=EOF){
    if (a>=0) {b[i]=sqrt((double)a);i++;}
    else  continue;
    cin>>a;
    }
    cout.setf(ios::fixed);
    cout.setf(ios::showpoint);
    for(int j=i-1;j>=0;j--) cout<<setprecision(4)<<b[i]<<endl;
return 0;
}
while(a!=EOF) - incorrect condition, read in FAQ how to input normally (-)
Posted by Orlangur [KievNU] 6 Apr 2007 15:50
And please check your solution at least on sample test before posting on board.