Help vhit super simple program
Posted: Sun Oct 10, 2004 9:21 pm
I am a total n00b whit QB and im trying to make a simple canculator
program. It looks like this:
CLS
INPUT "First number ", A
INPUT "Second number ", B
PRINT "A + B = " A + B
PRINT "A - B = " A - B
PRINT "A * B = "A * B
PRINT "A / B = "A / B
It works fine until I imput 0 as the Second number.
The error Division by zero
What can i do to stop this from hapening?
program. It looks like this:
CLS
INPUT "First number ", A
INPUT "Second number ", B
PRINT "A + B = " A + B
PRINT "A - B = " A - B
PRINT "A * B = "A * B
PRINT "A / B = "A / B
It works fine until I imput 0 as the Second number.
The error Division by zero
What can i do to stop this from hapening?