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

for help wrong answer
Posted by beyondliyang 4 May 2012 14:14
#include <stdio.h>
#include<cmath>
#include<iostream>
void main()
{
double a[100000];
    int i=0,count=0;
    while(std::cin>>a[i])
    {
         if ((a[i]>0||a[i]==0)&&(a[i]==pow(float(10),18)||a[i]<pow(float(10),18)))
         {
         printf("if you want to end press a char!\n");
        a[i]=sqrt((double)a[i]);
               count++;
        i++;    }
         else
             break;
    }
        getchar();

        for (int i=count-1;i>0||i==0;i--)
            printf("%.4lf\n",a[i]);

}