|
|
back to boardHelp ME!WA(C) Posted by Yanghe 31 Aug 2008 17:45 #include "stdio.h" #include "math.h" int main() { float a[32768]; int i,j=0; while(scanf("%f",&a[j])!=EOF)j++; for(i=0;i<=j;i++)printf("%.4f\n",sqrt(a[i])); return 0; } Why??How could I stop it? Re: Help ME!WA(C) The first: don't use float - need double (you lost precision) The second: amount of numbers in input can be at most 128*1024 (it is more than 32768) |
|
|