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

whats wrong? c++
Posted by sultz8 28 Jun 2020 22:18
#include <iostream>
#include <math.h>
#include <vector>
#include <stdlib.h>

using namespace std;
int main() {
    vector<double> v;
    int v1;
    while((cin>>v1))
    {
        v.push_back(v1);
    }
    int size = v.size();
    int first = v[0];
    int last = v[size-1];
    for(int i = size-1; i>=0; i--)
    {
        double a = sqrt(v[i]);
        printf("%.4lf\n", a);
    }
    return 0;
}