<=Back
The following is a program written using a C programming language. Identify the errors in the program.
#include<stdioh>
main()
{
int p[10],i;
float avg=0;
Printf(enter 10 numerals);
for(i=0;i<=9;i++)
{
scanf(“%d”,&p[i]);
}
for(i=0;i<=9;i++);
{
avg = avg+p[i];
}
avg=(float)avg/0;
printf(“enter average is %k\n”,avg);
 Viewed: 400 times
Share in: