63 041
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #16497 in C++ for Asdfh

Question #16497
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.
Expert's answer

#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions