lianardo
Feb 15, 2012, 08:10 AM
#include<stdio.h>
Int I,j;
Void calculate(const int b[i][j]);
Int main()
{
int a[i][j];
cal(a);
printf("the average is %d",calculate);
}
Void calculate(const int b[i][j])
{
int counterA=0, counterB=0, counterC=0, counterD=0, counterF=0;
int sum=0,avg,grade;
for(I=0; I<4; I )
for(j=0; j<2; j )
{
printf("Enter student grade >> ");
scanf("%lf", &grade);
sum =grade;
avg=sum/8;
if(grade>=80)
{
counterA ;
}
else
if(grade>=70 && grade<80)
{
counterB ;
}
else
if(grade>=60 && grade<70)
{
counterC ;
}
else
if(grade>=50 && grade<60)
{
counterD ;
}
else
{
counterF ;
}
}
printf("\nThe number of student that get A are >> %d", counterA);
printf("\nThe number of student that get B are >> %d", counterB);
printf("\nThe number of student that get C are >> %d", counterC);
printf("\nThe number of student that get D are >> %d", counterD);
printf("\nThe number of student that get F are >> %d", counterF);
}
Int I,j;
Void calculate(const int b[i][j]);
Int main()
{
int a[i][j];
cal(a);
printf("the average is %d",calculate);
}
Void calculate(const int b[i][j])
{
int counterA=0, counterB=0, counterC=0, counterD=0, counterF=0;
int sum=0,avg,grade;
for(I=0; I<4; I )
for(j=0; j<2; j )
{
printf("Enter student grade >> ");
scanf("%lf", &grade);
sum =grade;
avg=sum/8;
if(grade>=80)
{
counterA ;
}
else
if(grade>=70 && grade<80)
{
counterB ;
}
else
if(grade>=60 && grade<70)
{
counterC ;
}
else
if(grade>=50 && grade<60)
{
counterD ;
}
else
{
counterF ;
}
}
printf("\nThe number of student that get A are >> %d", counterA);
printf("\nThe number of student that get B are >> %d", counterB);
printf("\nThe number of student that get C are >> %d", counterC);
printf("\nThe number of student that get D are >> %d", counterD);
printf("\nThe number of student that get F are >> %d", counterF);
}