|
|
back to boardWA 3 C++ Hi, can anyone tell me what makes test 3 go wrong with this code, please? I have tried several variants of it but without any success. #include <iostream> #include <iomanip> #include <math.h> using namespace std; long double v[256*1024/2]; int main() { long double c; cout << setprecision(4) << fixed; int j = 0; while (1){ cin >> c; if (cin.eof()){break;} v[j] = sqrt(c); j += 1; }
for (int i = 0; i < j; i++){cout << v[j - 1 - i] << endl;} } |
|
|