main.m140 chars8 lines
In this code block, we start by prompting the user to enter a value using the input function. We then enter a while loop that will continue to execute as long as uservalue is less than 0. Within the loop, we add 5 to uservalue and then the program continues at the top of the loop to check if the condition is still true. Once the condition becomes false, the program exits the loop and the final value of uservalue is displayed using the disp function.
gistlibby LogSnag