8.Create a C program to determine the day of the week based on the input number using switch-case.
Objective:
The objective of this program is to take an input number representing a day of the week (1 for Sunday, 2 for Monday, and so on) and use a switch-case statement in C to determine and display the corresponding day of the week.
Agenda:
1. Define the input variable to represent the day of the week.
2. Use a switch-case statement to determine the day of the week based on the input number.
3. Display the corresponding day of the week as output.
Purpose:
The purpose of this program is to demonstrate the use of switch-case statements in C programming to determine specific outcomes based on different input values. It also serves as a simple example of conditional logic in programming.
Real-Life Applications:
Switch-case statements are commonly used in programming for decision-making based on multiple conditions. In real-life applications, this type of logic can be found in various scenarios such as menu selection in user interfaces, handling different cases in algorithms, and processing different types of input data.
write a C program to determine the day of the week based on the input number using switch-case.