|
|
back to boardTest 6 Access Violation Posted by Znol 31 Dec 2019 14:43 I think the promblem is in i-=2; This is to reduce i for ^Z symbol; idk how to fix this. #include <iostream> #include <algorithm> #include <iomanip> #include <math.h> using namespace std; int main() { double num[1000]; int i = 0; for (i; cin; i++) { cin >> num[i]; } for (i-=2; i >= 0; i--) {
cout << fixed << setprecision(4) << sqrt(num[i]) << endl; } } |
|
|