#include<stdio.h>
int main()
{
int marks[10]={0};
int x,sum=0,count1=0,count2=0;
float average=0;
printf("Enter the Marks:");
for(x=0;x<10;x++)
{
scanf("%d",&marks[x]);
sum=sum+marks[x];
}
average=(float)sum/10;
for(x=0;x<10;x++)
if (marks[x]>=average)
count1++;
else
count2++;
printf("Average marks of entire class is:%.2f\n",average);
printf("Number of students obtaining average or more marks are:%d\n",count1);
printf("Number of students obtaining below average marks are:%d",count2);
getch();
return 0;
}
int main()
{
int marks[10]={0};
int x,sum=0,count1=0,count2=0;
float average=0;
printf("Enter the Marks:");
for(x=0;x<10;x++)
{
scanf("%d",&marks[x]);
sum=sum+marks[x];
}
average=(float)sum/10;
for(x=0;x<10;x++)
if (marks[x]>=average)
count1++;
else
count2++;
printf("Average marks of entire class is:%.2f\n",average);
printf("Number of students obtaining average or more marks are:%d\n",count1);
printf("Number of students obtaining below average marks are:%d",count2);
getch();
return 0;
}
No comments:
Post a Comment