|
|
вернуться в форум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; } #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; } Did you resolve the problem? |
|
|