Computer Studies
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.
QBASIC: Conditional Statements
29 Likes
Answer
Flowchart

QBASIC Program
Cls
Input "ENTER NUMERATOR"; N
Input "ENTER DENOMINATOR"; D
Let DIFF = 0
If N > D Then
Print "IMPROPER FRACTION"
Let DIFF = N - D
Else
Print "PROPER FRACTION"
DIFF = D - N
End If
Print "DIFFERENCE = "; DIFF
End
Output
ENTER NUMERATOR? 15
ENTER DENOMINATOR? 10
IMPROPER FRACTION
DIFFERENCE = 5
Answered By
12 Likes
Related Questions
Write the syntax of IF - THEN - ELSE in QBASIC
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.
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.
Draw a flowchart and write a program in QBASIC to enter your name and the marks obtained in 10 different subjects in a term examination. Display the sum and average on the screen along with the name.