mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00
11 lines
262 B
Plaintext
11 lines
262 B
Plaintext
total := 0.0
|
|
loop {
|
|
("Total: ", total, ". Type a number to change.").concat.println
|
|
().read_line.trim.parse_float.try(
|
|
(n) -> &total = (total, n).sum
|
|
// not a number, so return a 1-tuple to break from the loop
|
|
() -> (())
|
|
)
|
|
}
|
|
"Goodbye.".println
|