mirror of
https://github.com/KarolS/millfork.git
synced 2024-09-01 01:28:59 +00:00
27 lines
492 B
Plaintext
27 lines
492 B
Plaintext
import stdio
|
|
import c64_basic
|
|
|
|
void main() {
|
|
word a
|
|
word b
|
|
|
|
putstrz("enter first number:{n}"z)
|
|
a = readword()
|
|
while readword_err != 0 {
|
|
putstrz("that wasn't a number, try again:{n}"z)
|
|
a = readword()
|
|
}
|
|
|
|
putstrz("enter second number:{n}"z)
|
|
b = readword()
|
|
while readword_err != 0 {
|
|
putstrz("that wasn't a number, try again:{n}"z)
|
|
b = readword()
|
|
}
|
|
|
|
putstrz("the sum is:{n}"z)
|
|
a += b
|
|
putword(a)
|
|
putchar(13)
|
|
}
|