|
|
вернуться в форум(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 Послано hatred 9 июл 2011 21:42 why u init j with i-2? it must be i-1 |
|
|