← Back to If Statements
Question 339
Day of the Week Name
Day of the Week Name
Read a day number from1to7withscanfand print its name with no trailing newline, where1isMondayand7isSunday:1->Monday,2->Tuesday,3->Wednesday,4->Thursday,5->Friday,6->Saturday,7->Sunday. For input1the output isMonday; for6it isSaturday; for7it isSunday.
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.