C# program to demonstrate example of switch statement
belongs to collection: C# Basic Programs | If else (conditional statement) programs
All Answers
total answers (1)
belongs to collection: C# Basic Programs | If else (conditional statement) programs
total answers (1)
C# code to demonstrate example of switch statement
Here, we are asking for a day number from the user between the range of 0 to 6, and printing day name (example: 0 for Sunday, 1 for Monday and so on...).
Output
C# code to check input character is a VOWEL or CONSOTANT using switch statement
Here, we are asking for a character from the user – and checking 1) input character is an alphabet using if-else statement and if it is an alphabet – we are checking for vowels & consonants.
Output