89 026
Assignments Done
97.4%
Successfully Done
In July 2020

# Answer to Question #42180 in C++ for Yazid abubakar

Question #42180
write a c programme that accept 10 student grade and then calculate their average
1
2014-05-09T08:50:23-0400
#include <stdio.h>#define SIZE 10char grade(float GPA) {    if ( GPA > 91 && GPA < 100 ) {        return 'A';    }    if ( GPA > 83 && GPA < 91 ) {        return 'B';    }    if ( GPA > 74 && GPA < 83 ) {        return 'C';    }    if ( GPA > 65 && GPA < 74 ) {        return 'D';    }    if ( GPA > 0 && GPA < 65 ) {        return 'F';    }}int main() {    int grades[SIZE];    int i, sum = 0;    for ( i = 0; i < SIZE; i++ ) {        printf("Please enter stdent grade number %d\n", i+1 );        scanf("%d", &grades[i]);        sum += grades[i];    }    printf("The students GPA is %g\nGrade : %c\n", (double)sum/SIZE, grade(sum/SIZE));    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!