|
|
back to boardcrash(access violation) #include<math.h> #include<stdio.h> int main() { double arr[1000]; int i=0,count=0; while(scanf("%lf",&arr[i])) { arr[i] = sqrt(arr[i]); i++; count++; } for(i=count-1;i>=0;i--) printf("\n %0.4lf",arr[i]); return 0; } Re: crash(access violation) size of a = 1000 is not enought -> index was out of size size of a maybe more than. Because file size = 256 KB. Unlimit A[i]. So that use array here is difficut to solve this problem! |
|
|