Soloway's recurring rainfall: Difference between revisions

→‎{{header|Wren}}: Changed to allow for negative rainfall which is news to me!
No edit summary
(→‎{{header|Wren}}: Changed to allow for negative rainfall which is news to me!)
Line 676:
var sum = 0
while (true) {
var i = Input.integer("Enter integral rainfall (99999 to quit): ", 0)
if (i == 99999) break
n = n + 1
Line 687:
<pre>
Enter integral rainfall (99999 to quit): 5.4
Must be an integer no less than 0, try again.
Enter integral rainfall (99999 to quit): -2 five
Must be an integer no less than 0, try again.
Enter integral rainfall (99999 to quit): 5
The current average rainfall is 5
Enter integral rainfall (99999 to quit): -2
The current average rainfall is 31.5
Enter integral rainfall (99999 to quit): 4
The current average rainfall is 2.3333333333333
Enter integral rainfall (99999 to quit): 10
The current average rainfall is 54.666666666666725
Enter integral rainfall (99999 to quit): 99999
</pre>
9,479

edits