Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Give a percentile grade S, and output grades A, B, C, D and E. If the score is above 90, a. 80 ~ 90 is divided into B, and 70 ~ 79 is divided into d. 60 ~.
Give a percentile grade S, and output grades A, B, C, D and E. If the score is above 90, a. 80 ~ 90 is divided into B, and 70 ~ 79 is divided into d. 60 ~.
# include & ltstdio.h & gt

int main()

{

int s;

Printf ("Please enter grade:");

scanf("%d ",& amps);

if(s & gt; 100 | | s & lt; 0)

{

Printf ("Incorrect score was entered. \ n ");

Returns1;

}

char ch

Switch (s/ 10)

{

Case 10:

Case 9: ch =' a'; Break;

Case 8: ch =' b'; Break;

Case 7: ch =' c'; Break;

Situation 6: ch =' d'; Break;

Default value:

Ch =' E breaks;

}

Printf ("The grade you entered is: %c\n", ch);

Returns 0;

}