|
|
back to boardWhat wrong? (с++) Posted by Plotnik 11 Jan 2024 19:59 #include <iostream> #include <algorithm> #include <iomanip> #include <string> #include <vector> #include <cmath> using namespace std; int main() { double element, a; vector<double> numbers; while (cin >> element) { numbers.push_back(element); } reverse(numbers.begin(), numbers.end()); for (size_t i = 0; i != numbers.size(); i++) { a = sqrt(numbers[i]); cout << setprecision(4) << a << "\n"; } return 0; } Edited by author 11.01.2024 20:23 |
|
|