WHAT IS WRONG IN MY ANSWER
QUSETION :9. Write a Qbasic program to find smallest among three numbers
ANSWER :CLS
INPUT " ENTER THE FIRST NUMBER" ,N1
INPUT "ENTER THE SECOND NUMBER" ,N2
INPUT " ENTER THE THRID NUMBER" ,N3
IF N1> N2 AND N1> N3 THEN
PRINT" THE SMALLEST NUMBER IS " , N1
ELSEIF N2 > N1 AND N2 > N3 THEN
PRINT " THE SMALLEST NUMBER IS " , N2
ELSE
PRINT " THE SMALLEST NUMBERS IS" ,N3
END IF
END
Answers
Answered by
34
INPUT "Enter the first number"; a
INPUT "Enter the second number"; b
INPUT "Enter the third number"; c
IF a < b AND a < c THEN
PRINT "The smallest number is "; a
ELSEIF b < a AND b < c THEN
PRINT "The smallest number is "; b
ELSE
PRINT "The smallest number is "; c
END IF
END
Answered by
34
INPUT "Enter the first number"; a
INPUT "Enter the second number"; b
INPUT "Enter the third number"; c
IF a < b AND a < c THEN
PRINT "The smallest number is "; a
ELSEIF b < a AND b < c THEN
PRINT "The smallest number is "; b
ELSE
PRINT "The smallest number is "; c
END IF
END
Similar questions
Science,
5 hours ago
Chemistry,
5 hours ago
Math,
5 hours ago
Geography,
10 hours ago
Social Sciences,
8 months ago