Computer Science, asked by rivika4902, 5 hours ago

What is Qbasic programmes to get the total numbers of any two giving numbers

Answers

Answered by anindyaadhikari13
3

Correct Question.

  • Write QBASIC program to find sum of two numbers entered by the user.

The Co‎‎de.

CLS

INPUT "Enter first number: "; A

INPUT "Enter second number: "; B

SUM = A + B

PRINT "Sum of the numbers you entered is: "; SUM

END

Explanation.

  1. Line 1: Clears the screen.
  2. Line 2-3: Ask the user to enter the numbers.
  3. Line 4: Calculates the sum of two numbers.
  4. Line 5: The sum is displayed on the screen.
  5. Line 6: End of program.

See attachment for output.

Attachments:
Answered by purveshKolhe
2

\huge{ \green{ \boxed{ \red{ \mathfrak{answer \: : }}}}}

QBASIC::

CLS

INPUT "Enter first number :- ",num1

INPUT "Enter second number :- ",num2

PRINT "Total :- " + (num1 + num2)

END

Logic::

==> The variable num1 stores first number and num2 stores second.

==> They are added by the '+' operator.

==> Wooh! We finished the program

Hope This Helps You..

Similar questions