[ad_1]
#include<stdio.h>
int main()
{
int a[100], i, n, sum=0;
printf("How many number:");
scanf("%d", &n);
for ( i = 0; i < n; i++)
{
scanf("%d", a[i]);
sum = sum + a[i];
}
printf("Sum is: %d\n", sum);
printf("Average is %0.2f", (float)sum/n);
return 0;
}
What’s the problem with my code? last two printf functions can not execute by the compiler. There any problem with my code?
[ad_2]