|
|
back to boardWrong Answer at test #1 Posted by ReDAeR 9 May 2010 00:34 .. Edited by author 13.05.2010 13:55 Re: Wrong Answer at test #1 Posted by ReDAeR 13 May 2010 13:55 <solved> Re: Wrong Answer at test #1 i got wrong answer inproblem 1001. But my input and output are ok. why? Re: Wrong Answer at test #1 what is wrong #include<stdio.h> #include<conio.h> #include<math.h> int main() {float a,b,c,d,e,t,g,h; scanf("%f",&e); scanf("%f",&t); scanf("%f",&g); scanf("%f",&h); a=sqrt(e); b=sqrt(t); c=sqrt(g); d=sqrt(h); printf("%.4f\n",d); printf("%.4f\n",c); printf("%.4f\n",b); printf("%.4f\n",a); return 0; } Re: Wrong Answer at test #1 #include<stdio.h> #include<conio.h> #include<math.h> main() {float a,b,c,d,e,f,g,h; scanf("%f",&e); scanf("%f",&f); scanf("%f",&g); scanf("%f",&h); a=sqrt(e); b=sqrt(f); c=sqrt(g); d=sqrt(h); printf("%.4f\n",d); printf("%.4f\n",c); printf("%.4f\n",b); printf("%.4f\n",a); return 0; } Re: Wrong Answer at test #1 You shold output results for each number of input meanings, not only for 4. Try using while () { } |
|
|