Answer to Question #145523 in Python for Nhlanhla

Question #145523
Write the pseudocode for a program that will continue prompting a user for a value whilst the total of all values remain less than 100. The program must keep track of the number of times the loop executes and display the number of times the loop executed once the loop had finished executing.
1
Expert's answer
2020-11-23T14:37:21-0500

BEGIN

NUMBER counter = 0, sum = 0

WHILE sum LESS THAN 100 DO

INPUT x

sum = sum + x

INCREMENT counter

ENDWHILE

PRINT counter

END


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS