7.
Write a program in
QBASIC to find cube of a given number using SUB…..END SUB.
DECLARE SUB CUBE (N)
CLS
INPUT “ENTER ANY NUMBER”; N
CALL CUBE (N)
END
SUB CUBE (N)
C = N ^ 3
PRINT “CUBE OF NUMBER “; C
END SUB
No comments:
Post a Comment