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

help why is wrong
Posted by armenia1993 4 May 2012 16:46
#include<iostream>
#include <stdio.h>
using namespace std;

int main(){
    freopen("in.txt", "r", stdin);
    int i = 0;
    double mas[9310];
    cin >> mas[i];
    while(mas[i]>=0) {
        i++;
        cin >> mas[i];
    }
    for(int k = i-1; k>=0; k--)
        printf("%.4lf\n",sqrt(mas[k]));
}
Re: help why is wrong
Posted by Margar 20 May 2012 22:36
#include <math.h>