cstartes
Search stops here
Pages
Home
Blogroll
Guest Post
Privacy Policy
Contact Us
About
Program to accept 10 nos from the user,store in array & find avg of no.
void main()
{
int a[10],i,sum=0;
float avg;
clrscr();
printf("Enter the number");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
sum=sum+a[i];
}
avg=sum/10;
printf("Sum=%d",sum);
printf("Average=%d",avg);
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment