RosettaCodeData/Task/Soloways-recurring-rainfall/BASIC256/soloways-recurring-rainfall.basic
2023-07-01 13:44:08 -04:00

14 lines
296 B
Text

n = 0
sum = 0
while True
input "Enter integral rainfall (99999 to quit): ", i
if i = 99999 then exit while
if (i < 0) or (i <> int(i)) then
print "Must be an integer no less than 0, try again."
else
n += 1
sum += i
print " The current average rainfall is "; sum/n
end if
end while