Soloway's recurring rainfall: Difference between revisions
Content added Content deleted
(→{{header|ALGOL 68}}: tweak) |
(→{{header|Wren}}: Added sample input/output) |
||
Line 431: | Line 431: | ||
System.print(" The current average rainfall is %(sum/n)") |
System.print(" The current average rainfall is %(sum/n)") |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
{{out}} |
|||
Sample session: |
|||
<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 |
|||
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 3.5 |
|||
Enter integral rainfall (99999 to quit): 10 |
|||
The current average rainfall is 5.6666666666667 |
|||
Enter integral rainfall (99999 to quit): 99999 |
|||
</pre> |