Basic Program How GOSUB Takes To a Diff Program and Return brings it back

REM NOTE HOW GOSUB TAKES TO A DIFF PROGRAMME AND RETURN BRINGS IT BACK
CLS
10 INPUT “ENTER ANY NUM”; A
20 INPUT “ENTER ANY NUM”; B
30 INPUT “ENTER ANY VALUE “; C
40 GOSUB 100
50 PRINT “C1:SUM OF THREE NUMBERS IS”; C1
60 PRINT “C2:SUM OF THE SQUARES OF THREE NUMBERS IS “; C2
70 PRINT “C3:SUM OF THE CUBES OF THREE NUMBERS”; C3
80 END
100 LET C1 = A + B + C
110 LET C2 = A ^ 2 + B ^ 2 + C ^ 2
120 LET C3 = A ^ 3 + B ^ 3 + C ^ 3
130 RETURN

Please follow and like us:

Leave a comment