Computer Studies
Draw a flowchart and write a program in QBASIC to enter two numbers. Subtract the second number from the first if the first number is greater than the second number or vice-versa.
QBASIC: Conditional Statements
57 Likes
Answer
Flowchart

QBASIC Program
Cls
Input "ENTER A NUMBER"; A
Input "ENTER ANOTHER NUMBER"; B
Let ANS = 0
If A > B Then ANS = A - B Else ANS = B - A
Print "ANSWER = ";ANS
End
Output
ENTER A NUMBER? 70
ENTER ANOTHER NUMBER? 20
ANSWER = 50
Answered By
42 Likes
Related Questions
Write the syntax of IF - THEN in QBASIC
Write the syntax of IF - THEN - ELSE in QBASIC
Draw a flowchart and write a program in QBASIC to enter the numerator and denominator of a fraction. Check and print whether the fraction is proper or improper. The program will also display the difference between the numerator and the denominator accordingly.
Draw a flowchart and write a program in QBASIC to accept three angles of a triangle. The program will check whether the triangle is possible or not.