← Back to Menus & Validation
Question 456
Largest Until Done
Largest Until Done
Read whole numbers one per line with the prompt Number: until the word done, then print Largest: <n> for the biggest one, or No numbers. when done came first. The first number must always be taken as the largest so far, so that a list of negative numbers works too (the count of numbers read tells you whether this is the first). Input: zero or more integers, one per line, then done. The prompts are part of the output and run together on one line in front of the result.
Expected Output:
Number: Number: Number: Number: Largest: 9= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Menus & Validation
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.