Category: Computer Programs

Basic Program To add two in Series and Put as next in Series

REM THIS PROG ADDS TWO IN SERIES AND PUTS AS NEXT IN SERIES
REM This Prog is not correct N2=1 and put step nos (see N3prog)
CLS
INPUT “ENTER THE VALVUE “; N
N1 = 0
N2 = 0
PRINT N1; N2
FOR I = 1 TO N
N3 = N1 + N2
PRINT N3
N1 = N2
N2 = N3
NEXT I
END

Basic Program To Store and Print 10 Numbers

10 CLS
20 REM TO STORE AND PRINT 10 NUM
30 DIM A(10)
40 FOR I = 1 TO 10
50 INPUT “ENTER THE NUMBER”; A(I)
60 NEXT I
70 CLS
80 FOR I = 1 TO 10
90 PRINT A(I)
100 NEXT I
110 END

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

Basic Program To Store and Print First N Even Numbers

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