WAP to find middle number among 3 number
CLS
INPUT"ENTER ANY NUMBER";A
INPUT"ENTER ANY NUMBER";B
INPUT"ENTER ANY NUMBER";C
IF A > B AND A < C THEN
PRINT"THE MIDDLE NUMBER IS";A
ELSE IF B>A AND B < C THEN
PRINT"THE MIDDLE NUMBER IS";B
ELSE
PRINT"THE MIDDLE NUMBER IS";C
END IF
END
INPUT"ENTER ANY NUMBER";A
INPUT"ENTER ANY NUMBER";B
INPUT"ENTER ANY NUMBER";C
IF A > B AND A < C THEN
PRINT"THE MIDDLE NUMBER IS";A
ELSE IF B>A AND B < C THEN
PRINT"THE MIDDLE NUMBER IS";B
ELSE
PRINT"THE MIDDLE NUMBER IS";C
END IF
END
Comments
Post a Comment