0_0_36863781_11156.cpp: In function 'int main()':
0_0_36863781_11156.cpp:6:9: error: 'i' was not declared in this scope
int a[i],sum=0;
^
0_0_36863781_11156.cpp:8:18: error: invalid types 'int[int]' for array subscript
scanf("%d",&a[i]);
^
0_0_36863781_11156.cpp:9:11: error: invalid types 'int[int]' for array subscript
sum+=a[i];
^
0_0_36863781_11156.cpp:12:17: error: 'sum' was not declared in this scope
printf("%d\n",sum);
^
0_0_36863781_11156.cpp: At global scope:
0_0_36863781_11156.cpp:14:2: error: expected unqualified-id before 'return'
return 0;
^
0_0_36863781_11156.cpp:15:2: error: expected declaration before '}' token
}
^
|