|
|
вернуться в форумStack overflow I dont know if I use the array with size 131072 I get result "access violation" if I use the size 131073 I get the result "stack overflow" so how I get the right way to resolve the problem, sorry for my bad english; #include <stdio.h> #include <math.h> int main() { int index = -1; double stack[131073]; while(scanf("%lf", &stack[++index]) != EOF); for(; top > 0;printf("%.4lf\n", sqrt(stack[--index]))); return 0; } Re: Stack overflow Послано Jane 3 июл 2012 00:09 #include <stdio.h> #include <math.h> double stack[131073]; int main() { int index = -1; while(scanf("%lf", &stack[++index]) != EOF); for(; index > 0;printf("%.4lf\n", sqrt(stack[--index]))); return 0; } Re: Stack overflow Послано Coder 25 ноя 2012 21:24 Did you resolve the problem? |
|
|