RosettaCodeData/Task/Soloways-recurring-rainfall/BASIC256/soloways-recurring-rainfall.basic

15 lines
296 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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