|
|
вернуться в форумcrash(access violation) test #9 crash(access violation) double..[65536] ???? who can help me?? Re: crash(access violation) oh....it's my code int main(void) { double number,root,temp,answer[65536]; int i=0; while(EOF!=scanf("%lf",&number)) { if(number==0) root=0; else { root=1; temp=(root+number/root)/2; while(root!=temp) { root=temp; temp=(root+number/root)/2; } } answer[i++]=root; } for(i-=1;i>=0;i--) printf("%.4lf\n",answer[i]); return 0; } Re: crash(access violation) double number,root,temp,answer[65536]; Size of test is not more than 256 KB. If each number consists from only one digit and there are blank spaces between numbers so no more than 131072 numbers could be in one test, not 65536. Re: crash(access violation) oh,thanks!I got it! |
|
|