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

What's wrong in my code?
Posted by moijf 20 Sep 2007 20:52
Of course there is a pb
64000 is enougth for 256k input
my source is  there
Merci....
#include <iostream>
#include <math.h>
using namespace std;
int main()
{double nb;
float tableau[64000];
int pointeur=0;
 //freopen("1001.txt", "r", stdin);//to test my exemples
 while(cin>>nb)
 tableau[pointeur++]=sqrt(nb);
pointeur--;
for (int i=pointeur;i>=0;i--)    printf("%.4f\n",tableau[i]);
return 0;
}
Re: What's wrong in my code?
Posted by Razdolbay from SIS 20 Sep 2007 21:52
Use "double" instead of "float" and you'll get AC ;)