Advertisement

WAP IN C TO GET AVERAGE


 #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();

}


Post a Comment

0 Comments