Question #146135

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 executi

Expert's answer

counter = 0
total = 0
while total < 100
  print "Enter a value"
  total = total + readValue()
  counter = counter + 1
print counter
LATEST TUTORIALS
APPROVED BY CLIENTS