CJCoding With Joseph

Day of the Week Name

Read a day number from 1 to 7 with scanf and print its name with no trailing newline, where 1 is Monday and 7 is Sunday:

1 -> Monday, 2 -> Tuesday, 3 -> Wednesday, 4 -> Thursday, 5 -> Friday, 6 -> Saturday, 7 -> Sunday.

For input 1 the output is Monday; for 6 it is Saturday; for 7 it is Sunday.

Expected Output:

Monday
Topics:
If Statements
๐Ÿ“ฅ Auto-Input:
1\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.