56.
Write a program to
input three different numbers in the main module then find the greatest number
using SUB….END SUB.
DECLARE FUNCTION GREAT (A,
B, C)
INPUT “ENTER ANY THREE
NUMBERS”; A, B, C
PRINT “THE GREATEST NUMBER
IS”; GREAT (A, B, C)
END
FUNCTION GREAT (A, B, C)
IF A > B AND A > C
THEN
G = A
ELSEIF B > A AND B >
C THEN
G = B
ELSE
G = C
END IF
GREAT = G
END FUNCTION
No comments:
Post a Comment