1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-09-01 01:28:59 +00:00
millfork/examples/c64/calculator.mfk
2018-12-19 19:01:53 +01:00

30 lines
536 B
Plaintext

import stdio
import c64_basic
void main() {
word a
word b
putstrz("enter first number:"z)
new_line()
a = readword()
while errno != err_ok {
putstrz("that wasn't a number, try again:"z)
new_line()
a = readword()
}
putstrz("enter second number:{n}"z)
b = readword()
while errno != err_ok {
putstrz("that wasn't a number, try again:"z)
new_line()
b = readword()
}
putstrz("the sum is:"z)
new_line()
putword(a + b)
new_line()
}