Day of the Week Name
mediumQuestion 339Read 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
Sign in to use hintsTopics
If Statements
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.