ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Why does it return compilation error? I'm using GCC compilator.
Posted by satybal 12 Mar 2024 13:34
#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int main() {

    double number;
    vector<double> numbers;

    while (cin >> number)
        numbers.push_back(number);

    cout.precision(4);
    cout.setf(std::ios::fixed);

    for (auto iter = numbers.rbegin(); iter != numbers.rend(); ++iter)
        cout << sqrt(*iter) << endl;

    return 0;
}