Soloway's recurring rainfall: Difference between revisions

Content added Content deleted
No edit summary
(Added Wren)
Line 385: Line 385:
}
}
</syntaxhighlight>
</syntaxhighlight>

=={{header|Wren}}==
{{libheader|Wren-ioutil}}
<syntaxhighlight lang="ecmascript">import "./ioutil" for Input

var n = 0
var sum = 0
while (true) {
var i = Input.integer("Enter integral rainfall (99999 to quit): ", 0)
if (i == 99999) break
n = n + 1
sum = sum + i
System.print(" The current average rainfall is %(sum/n)")
}</syntaxhighlight>