|
|
back to board(help!!!!!)why wrong answer #include <iostream> #include<iomanip> #include <cmath> double a[131072]; using namespace std; int main() { double num;
int i=0; while(!cin.eof()) { cin>>a[i]; a[i]=sqrt(a[i]); i++; } for(int j=i-2;j>=0;j--) { cout<<fixed<<setprecision(4)<<a[j]<<endl; } return 0; } Re: (help!!!!!)why wrong answer Posted by hatred 9 Jul 2011 21:42 why u init j with i-2? it must be i-1 |
|
|