CJCoding With Joseph
15free / daySign inCreate account

Largest With A Loop

Four whole numbers are read into a list. Find the largest with a for loop that keeps a largest variable, starting it at the first item and replacing it whenever a bigger value comes along (no max()). Print the result in the form Largest: <value>. Input: four integers, one per line, no prompts.

Expected Output:

Largest: 9

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

Hints2 available
Topics:
Loops
📥 Auto-Input:
3\n9\n4\n7\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.