Answer to Question #16497 in C++ for Asdfh
create a program that will input 10grades (75:passing, 79-84:C, 85-89:B, 90-94:A, 95:A+). It will display the average grade.
1
2012-10-16T11:44:32-0400
#include <stdio.h>
#include <stdlib.h>
int grades[10] ;
int main ()
{
int n;
for(int i=0;i<10;i++){
printf("Enter grade %d: ",(i+1));
scanf("%d",&grades[i]);
}
double average=0;
double sum=0;
for (n=0; n<10; n++){
sum+=grades[n];
}
average=sum/10;
printf ("Average= %.2f ",average);
scanf("%d",&grades[0]);
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment