2018-01-20 21:10:04 +00:00
|
|
|
import stdio
|
|
|
|
import c64_basic
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
word a
|
|
|
|
word b
|
|
|
|
|
2018-07-27 22:58:20 +00:00
|
|
|
putstrz("enter first number:{n}"z)
|
2018-01-20 21:10:04 +00:00
|
|
|
a = readword()
|
|
|
|
while readword_err != 0 {
|
2018-07-27 22:58:20 +00:00
|
|
|
putstrz("that wasn't a number, try again:{n}"z)
|
2018-01-20 21:10:04 +00:00
|
|
|
a = readword()
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:58:20 +00:00
|
|
|
putstrz("enter second number:{n}"z)
|
2018-01-20 21:10:04 +00:00
|
|
|
b = readword()
|
|
|
|
while readword_err != 0 {
|
2018-07-27 22:58:20 +00:00
|
|
|
putstrz("that wasn't a number, try again:{n}"z)
|
2018-01-20 21:10:04 +00:00
|
|
|
b = readword()
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:58:20 +00:00
|
|
|
putstrz("the sum is:{n}"z)
|
2018-01-20 21:10:04 +00:00
|
|
|
a += b
|
|
|
|
putword(a)
|
|
|
|
putchar(13)
|
|
|
|
}
|