Computer Science, asked by shreekrishnatyre221, 4 months ago

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.​

Answers

Answered by imsachinrathore
9

Answer:

CLS

INPUT “Numerator “, n

INPUT “Denominator “, d

IF n < d THEN

PRINT “Fraction is Proper.”

ELSEIF n > d OR n = d THEN

PRINT “Fraction is Improper.”

END IF

END

Explanation:

Fraction: When an object is divided into a number of equal parts then each part is called a fraction.

There are different ways of writing a fraction. For example, two fifths of an object can be written as

a common fraction 2/5

a decimal 0.4

a percentage 40%

Numerator: the top number of a fraction.

Denominator: the bottom number of a fraction.

FRACTION TYPES

There are 3 different types of fractions:

Proper Fractions: Numerator < Denominator

Proper fractions have the nominator part smaller than the denominator part. Example 1/2.

Improper Fractions: Numerator > Denominator or Numerator = Denominator,

Improper fractions have the nominator part greater or equal to the denominator part. Example 3/2.

Mixed Fractions: Have a whole number plus a fraction. Example 1 ¾.

Similar questions