Use your switch statement skills to build a program that classifies any day number (1–7) as either a weekday or a weekend.
YOUR TASK
Write a C program that:
Reads a number from 1 to 7 (1 = Monday … 7 = Sunday)
Uses a switch statement to categorise it
Prints Weekday or Weekend
Handles invalid input with a default case
Need a hint?
Step-by-step:
1. int day; then scanf("%d", &day);
2. Open a switch(day) block
3. Cases 1–5 → print Weekday
4. Cases 6 and 7 → print Weekend
5. default: → print Invalid
6. Remember break; after each case!
Example (input: 6):
Enter day (1-7): 6
Weekend
Example (input: 3):
Enter day (1-7): 3
Weekday
Code Editor
Ready
Output
Console
Console initialized...
Ready for Project 2: Day Type Checker
> Use "Check My Code" to validate your solution
> Complete button unlocks when all tests pass!