C# Program to print weekday name from a given weekday number (0-6). A switch statement allows checking a value with a list of values or cases.
Weekday number is the number whose value from 0 to 6. 0 is for “Sunday”, 1 is for “Monday”, 2 is for “Tuesday”, 3 is for “Wednesday”, 4 is for “Thursday”, 5 is for “Friday” and 6 is for “Saturday”. This will check with a switch statement.
Input: 2 Output: Tuesday Input: 6 Output: Saturday
Output: When we enter number between (0-6).
Enter weekday number (0-6): It is WEDNESDAY
Output: When we enter number beyond the range from (0-6).
Enter weekday number (0-6): It is wrong input
- Different Ways to Take Input and Print a Float Value in C#
- C# Program to print all permutations of a given string
- Program to print half Diamond star pattern
- Program to Print a New Line in C#
- Program to Print Backslash () in C#
- C# | How to get the Standard Input Stream through Console
- C# | Check if Input is Redirected on the Console or not
- C# | How to change the Input Encoding Scheme of the Console
- How to Mask input in MaskedTextBox in C#?
- C# Program to Find the Number Occurring Odd Number of Times
- Hello World Program : First program while learning Programming
- C# Program for Minimum number of jumps to reach end
- C# Program to Count number of binary strings without consecutive 1's
- C# Program to Count trailing zeroes in factorial of a number
- C# Program for nth Catalan Number
- Program to find absolute value of a given number
- C# Program to Convert the Octal String to an Integer Number
- Program to convert Byte array to IP Address
- C# Program for Naive algorithm for Pattern Searching
- C# Program for KMP Algorithm for Pattern Searching
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.