Professional Documents
Culture Documents
TASK:
NTRODUCTION:
A switch condition/statement allows a variable to be tested for
equality against a list of values. Each value is called a case, and the
variable the entered variable is checked for each case.
To make a variable being checked, for only a single case and then
stop the process if the case is true we use a function called
Switch
Break
Default
Are the functions which are used in this program and they are
defined in the introduction of the report.
The result that we got on the console window can be seen in the
screenshot below:
SULT#2
(This result shows that if we enter a value that is not defined so the
“default” will perform its function and Invalid grade will be printed out on
the screen)