|
|
back to boardPlease, help me. WA C++ Posted by dem 5 Jul 2008 22:17 #include <iostream> #include <iomanip> #include <string.h> #include <math.h> using namespace std; void main( void){ double num[32768]; int sz; sz = sizeof(num) / sizeof(num[0]); for(int i = 0; i < sz; i++ ){ if (cin.eof()){ sz = ++i; break;} cin >> num[i]; } cout << setiosflags(ios::fixed); cout << setiosflags(ios::showpoint); cout << setprecision(4); for(int i = sz - 1; i >= 0; i-- ) cout << sqrt(num[i]) << endl; } |
|
|