Qbasic program to enter three numbers and find the middle number.
CLS
INPUT "ENTER ANY THREE NUMBERS";A,B,C
IF A>B AND A<C OR A<B AND A>C THEN
PRINT "THE MIDDLE NO IS ";A
ELSEIF B>A AND B<C OR B<A AND B>C THEN
PRINT "THE MIDDLE NO IS ";B
ELSE
PRINT "THE MIDDLE NO IS ";C
END IF
END
No comments:
Post a Comment