write a program in QBASIC to PRINT the greatest of 3 no's using LET AND INPUT statement
Answers
Answered by
3
Hello!!!
Question-
Write a program in QBASIC to PRINT the greatest of 3 no's using LET AND INPUT statement.
Answer-
CLS
INPUT"ENTER THREE NUMBERS";a,b,c
IF (a>b) AND (a>c) THEN
PRINT "FIRST NUMBER IS GREATER"
ELSEIF (b>a) AND (b>c) THEN
PRINT "SECOND NUMBER IS GREATER"
ELSE
PRINT "THIRD NUMBER IS GREATER"
END IF
END
Hope it helps:)
Question-
Write a program in QBASIC to PRINT the greatest of 3 no's using LET AND INPUT statement.
Answer-
CLS
INPUT"ENTER THREE NUMBERS";a,b,c
IF (a>b) AND (a>c) THEN
PRINT "FIRST NUMBER IS GREATER"
ELSEIF (b>a) AND (b>c) THEN
PRINT "SECOND NUMBER IS GREATER"
ELSE
PRINT "THIRD NUMBER IS GREATER"
END IF
END
Hope it helps:)
aleeza6377:
thanks
Similar questions