|
|
back to boardWhat is happening? Why is here the runtime error on the 6 test? What test is 6? #include <iostream> #include <cmath> using namespace std; void ghjkl(long double p) {cout << fixed; cout.precision(4); cout << p << endl;} int main() { long double a[1000]={-1.0}; long long i=0; while(cin) {cin >> a[i]; i++;} i=i-2; long double b[1000]; for(int k=0; k<1000; k++) {b[k]=sqrt(a[k]);} for(int m=i; m>=0; m--) {ghjkl(b[m]);} return 0; } Edited by author 24.03.2021 16:53 Edited by author 24.03.2021 16:54 Re: What is happening? i don't know Edited by author 31.03.2021 19:27 Edited by author 31.03.2021 19:27 Edited by author 31.03.2021 19:27 |
|
|