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

could you help me,I don't know what's the matter?problem set 1001
Posted by gigliolily 29 Oct 2011 16:24
 problem set 1001
#include<stdio.h>
#include<math.h>
void main()
{long a,b,c,d;
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
printf("%6.4f%5.4f%13.4f%8.4f",sqrt(d),sqrt(c),sqrt(b),sqrt(a));
}
I know it's wrong ,but I don't know which type to use to define the figure that is very big

Edited by author 29.10.2011 16:35

Edited by author 29.10.2011 16:35
Re: could you help me,I don't know what's the matter?problem set 1001
Posted by Maksim An (MSU TB) 29 Oct 2011 16:47
there may be more than 4 numbers as input and your solution is right only for cases with 4 numbers

P.S. read the statements more carefully

Edited by author 29.10.2011 16:48
Re: could you help me,I don't know what's the matter?problem set 1001
Posted by gigliolily 29 Oct 2011 16:49
but it only gives four figures.thanks for help.