|
|
back to boardWhy i got wrong ans @ C++ Posted by iCE Hin 20 Jul 2011 19:02 #include <cmath> #include <cstdio> #define MAXBUF 256*1024 using namespace std; double list[256*1024/8]; int i, nc; int main(){
while ( nc < MAXBUF && scanf("%lf", &list[i]) ){ ++i; nc += sizeof(list[i]); }
for ( int j = i - 1 ; j >= 0; --j ) printf("%.4lf\n", sqrt(list[j]) );
return 0; } Edited by author 20.07.2011 19:09 |
|
|