Rewrite the following if-else chain using a switch statement If (lettergrade=='A') printf(The numerical grade is between 90

Question:

Rewrite the following if-else chain using a switch statement
If (lettergrade=='A')
printf("The numerical grade is between 90 and 100\n");
else if((lettergrade=='B')
printf("The numerical grade is between 80 and 89.9\n");
else if(lettergrade=='C')
printf("The numerical grade is between 70 and 70.9\n");
else if(lettergrade=='D')
printf(" How are you going to explain this one\n");
else
{
printf("of course I had nothing to do with my grade\n");
pringf("The teacher was really off the wall\n")
}
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Introductory Statistics For The Behavioral Sciences

ISBN: 9780470907764

7th Edition

Authors: Joan Welkowitz, Barry H. Cohen, R. Brooke Lea

Question Posted: