Lab Exercise of Switch Statement

hercules[12]% a.out
Please enter a character grade (A, B, C, or F): A
Great work.
Please enter a character grade (A, B, C, or F): B
Good work.
Please enter a character grade (A, B, C, or F): B
Good work.
Please enter a character grade (A, B, C, or F): C
Average work.
Please enter a character grade (A, B, C, or F): F
You failed the class
Please enter a character grade (A, B, C, or F): C
Average work.
Please enter a character grade (A, B, C, or F): s
s is not a legal grade.
Please enter a character grade (A, B, C, or F): x
x is not a legal grade.
Please enter a character grade (A, B, C, or F): F
You failed the class
Please enter a character grade (A, B, C, or F): B
Good work.
There are 1 A students in total.
There are 3 B students in total.
There are 2 C students in total.
There are 2 F students in total.
There are 2 invalid grades.




Copyright: Department of Computer Science, University of Regina.