PRACTICAL-2
OBJECT: Write a program to
calculate Square and Cube of first Ten Natural Numbers
10 REM * PROGRAM TO
CALCULATE SQUARE AND CUBES *
20 CLS
30 PRINT “NUMBERS”,
“SQUARE”, “CUBE”
40 PRINT
“~~~~~~~~~”, “~~~~~~~~”, “~~~~”
50 FOR N = 1 TO 10
60 PRINT N, N^2, N^3
70 NEXT N
80 PRINT STRING$(35, “~”)
90 END
|
0 comments:
Post a Comment