QBASIC PROGRAM TO DISPLAY SUM OF CUBE OF TWO NUMBERS
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
C = A ^ 3 + B ^ 3
PRINT “SUM OF CUBE OF TWO NUMBERS ”; C
END
USING SUB
DECLARE SUB SUMCUBE(A,B)
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
CALL SUMCUBE(A,B)
END
SUB SUMCUBE(A,B)
C = A ^ 3 + B ^ 3
PRINT “SUM OF CUBE OF TWO NUMBERS ”; C
END SUB
0 Comments