#include<stdio.h>
#include<conio.h>
main()
{
int a[10],i,sum=0;
float average;
clrscr();
printf("enter the 10 numbers");
for(i=0;i<=9;i++)
scanf("%d",a[10]);
for(i=0;i<=9;i++)
sum=sum+a[i];
average=sum/10;
printf("average=%f",average);
getch();
}
#include<conio.h>
main()
{
int a[10],i,sum=0;
float average;
clrscr();
printf("enter the 10 numbers");
for(i=0;i<=9;i++)
scanf("%d",a[10]);
for(i=0;i<=9;i++)
sum=sum+a[i];
average=sum/10;
printf("average=%f",average);
getch();
}
0 Comments