CJCoding With Joseph
15free / daySign inCreate account

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

= newline. No newline after the last line.

Hints4 available
Topics:
If Statements
📥 Auto-Input:
1\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.