|
|
back to boardWhy crash? Posted by Newton 20 Dec 2008 18:01 #include <cstdio> #include <cmath> #define MAX 100 int main(){ long double a[MAX]; int i; for(i = 0; scanf("%Lf",&a[i]) == 1; i++); for(i = i-1; i >= 0; i--){ printf("%.4Lf\n",sqrtl(a[i])); } return 0; } Re: Why crash? Because number of elements can be larger than 100 (the size of input is up to 256KB) |
|
|