Q6. Write a program in QBASIC to add two numbers.
Answers
Answered by
119
Answer:
PRINT "PROGRAM: Add 2 numbers"
INPUT "Enter the 1st number: ", number1
INPUT "Enter the 2nd number: ", number2
---this is answer but not sure is it correct?
Answered by
31
The program in QBASIC to add two numbers is,
INPUT “Enter the first number”; A
INPUT “Ente the second number”; B
S = A + B
PRINT “SUM OF TWO NUMBERS”; S
END
Here INPUT, PRINT, and END are the keywords that have special meanings to the interpreters and compilers.
And, capital letters are the identifiers defined by the user to store and operate on them.
Similar questions