211,015 views
22 votes
22 votes
Write a while loop that prints user_num divided by 2 until user_num is less than 1. The value of user_num changes inside of the loop.

User Molenzwiebel
by
3.1k points

1 Answer

26 votes
26 votes

Answer:

user_num >= 1

while true do

print "user_num/2"

Step-by-step explanation:

First, you write that the user_num is equal to or is greater than 1. Then you write in the while loop that while that's true, print user_num divided by two.

User Bryc
by
2.8k points