Basic Program To Store and Print First N Odd Numbers

10 CLS
20 REM TO STORE AND PRINT FIRST N ODD NUMBERS
30 INPUT “ENTER HOW MANY NUMBERS”; N
40 DIM A(N)
50 FOR I = 1 TO N
60 LET A(I) = 2 * I – 1
70 NEXT I
80 CLS
90 FOR I = 1 TO N
100 PRINT A(I)
110 NEXT I
120 END

Please follow and like us:

Leave a comment