Write an expression that executes the loop while the user enters a number greater than or equal to 0. Note: These activities may test code with different test values. This activity will perform three tests, with user input of 9, 5, 2, -1, then with user input of 0, -17, then with user input of 0 1 0 -1. See "How to Use zyBooks". Also note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report "Test aborted."

Respuesta :

Answer:

while ( num >= 0) { ... }

Explanation:

Required

Express to execute a while loop with the given condition.

The condition in the question is that: the user input must be greater than or equal to 0.

The statement for this is:

[tex]while[/tex] ( [tex]num[/tex] [tex]>=[/tex] [tex]0[/tex]) { [tex]...[/tex] }

Where num is the input variable