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

Where is error?Why?
Posted by Alex_Kolpakov(TNU) 3 Jun 2008 03:31
#include <stdio.h>
#include <math.h>
void main()
{
  __int64 d;
  printf("Enter EOF for end\n");
  while(scanf("%I64d",&d)!=EOF)
   if(d<=(10<<8)*100)printf("%.4f\n",sqrt(d));
}
Re: Where is error?Why?
Posted by Towelenee 3 Jun 2008 03:34
Re: Where is error?Why?
Posted by Towelenee 3 Jun 2008 03:35
Because int main(void){
return 0;
}
Re: Where is error?Why?
Posted by Vedernikoff Sergey 3 Jun 2008 16:02
It is not the main problem (though also the problem). Major troublemaker is the line:

printf("Enter EOF for end\n");

Why do you do this? The problem statement doesn'n tell you to output "Enter EOF for end"...