mirror of
https://github.com/Dummi26/mers.git
synced 2026-01-26 10:47:04 +01:00
Add division to examples/03 and add any and all functions for Iter<Bool>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"- Calculator -".println
|
||||
"Type =<num> to set the value to that number.".println
|
||||
"Type +<num>, -<num> or *<num> to change the value.".println
|
||||
"Type +<num>, -<num>, *<num> or /<num> to change the value.".println
|
||||
"Type exit to exit.".println
|
||||
|
||||
current := 0.0
|
||||
@@ -19,9 +19,11 @@ current := 0.0
|
||||
¤t = (current, (num, -1).product).sum
|
||||
} else if mode.eq("*") {
|
||||
¤t = (current, num).product
|
||||
} else if mode.eq("/") {
|
||||
¤t = (current, num).div
|
||||
} else if mode.eq("=") {
|
||||
¤t = num
|
||||
} else if input.eq("exit") {
|
||||
} else if (input.eq("exit"), input.eq("")).any {
|
||||
(())
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user