The while-loop for this problem should iterate or repeat while the entered value is greater than or equal to 0 (or is not less than 0). We'll name the variable used for user input number. The program must also "remember" the largest number entered during each iteration, implying another variable, which we'll call max. While-loops are a test at the top loop, which constrains the solution in some ways. Specifically, the program must initialize number before using it in the loop test, comparing it to max. This requirement implies that there must be a prompt and read before the loop.
Inside the loop, we must compare number and max and update max whenever number is greater. The loop must also prompt and read for the next value of number.