CJCoding With Joseph
15free / daySign inCreate account

Coat Or Umbrella

Read a temperature and then a yes or no answer to whether it is raining, and give advice using nested ifs: when raining, below 10 degrees prints Coat and umbrella and otherwise Umbrella; when dry, below 10 degrees prints Coat and otherwise No coat needed. Input: two lines, the temperature as an integer then the answer, no prompts. Output: one line.

Expected Output:

Coat and umbrella

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
If Statements
📥 Auto-Input:
5\nyes\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 · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.