Go to home page of Udaipurplus.com

 

PAGE - 3

 

1

REM SUM OF FIRST N ODD AND EVEN NUMBERS USING GOSUB AND RETURN
CLS
10 INPUT "ENTER ANY VALUE(N)"; N
20 GOSUB 100
30 GOSUB 200
40 PRINT "SUM OF ODD NUM"; SUM1
50 PRINT "SUM OF EVEN NUM"; SUM2
60 END
100 SUM1 = 0
110 FOR I = 1 TO N
120 X = 2 * I - 1
130 SUM1 = SUM1 + X
140 NEXT I
150 RETURN
200 SUM2 = 0
210 FOR I = 1 TO N
220 X = 2 * I
230 SUM2 = SUM2 + X
240 NEXT I
250 RETURN

2

2 REM This programme adds the previous two numbers and places the sum in next
3 REM series.THIS WAS THE LAST PROGRAMME IN COPY
5 CLS
10 INPUT "enter the value of W"; N
20 N1 = 0
30 N2 = 1
40 PRINT N1; N2
41 REM N2;CAN BE PUT so that all are printed in one line
42 REM we need to print N1, N2 both so that 0 1 1 2...2
50 FOR I = 1 TO N
60 N3 = N1 + N2
70 PRINT N3;
80 N1 = N2
90 N2 = N3
100 NEXT I
110 END

3

REM 90% ABOVE BOYS...?
CLS
10: INPUT " ENTER NUMBER OF STUDENTS IN THE CLASS"; S
20 : FOR I = 1 TO S
30 : INPUT " ENTER STUDENT NAME "; S$
40 : INPUT "ENTER STUDENT ROLL NO "; R
45 : INPUT "ENTER THE STUDENT CLASS"; R
50 : INPUT "STUDENT MATHEMATICS NO "; M
60 : INPUT "ENTER STUDENT SCIENCE NO "; S
70 : INPUT "ENTER STUDENT HINDI NO "; H
80 : INPUT "STUDENT ENGLISH NO "; E
90 : INPUT "STUDENT COMPUTER NO "; C
100 : T = M + S + H + E + C
110 : IF T > 450 THEN 120 ELSE 140
120 : PRINT " G$ = A1 "
130 : GOTO 160
140 : PRINT " G$ = A2"
150 : GOTO 160
160 : NEXT I
170 : END

4

REM THIS PROGRAMME TELLS WHO IS ABOVE 90% MERIT STUDENT
CLS
1 O: INPUT " ENTER NUMBER OF STUDENTS IN THE CLASS"; S
20 : FOR I = 1 TO S
30 : INPUT " ENTER STUDENT NAME "; S$
40 : INPUT "ENTER STUDENT ROLL NO "; R
45 : INPUT "ENTER THE STUDENT CLASS"; N
50 : INPUT "STUDENT MATHEMATICS NO "; M
60 : INPUT "ENTER STUDENT SCIENCE NO "; S
70 : INPUT "ENTER STUDENT HINDI NO "; H
80 : INPUT "STUDENT ENGLISH NO "; E
90 : INPUT "STUDENT COMPUTER NO "; C
100 : T = M + S + H + E + C
110 : IF T > 450 THEN 120 ELSE 140
120 : PRINT S$; " ROLL NUM"; R; " CLASS"; N; " A1 YOU ARE IN MERIT"
130 : GOTO 160
140 : PRINT S$; " ROLL NUM"; R; "CLASS"; N; " A2 YOU ARE NOT MERIT"
150 : GOTO 160
160 : NEXT I
170 : END

5

REM THE PROG TELLS IF THE GIVEN NUMBER IS EVEN OR ODD. TAKE THE NUMBER
REM DIVIDE IT BY TWO. REMAINDER IS EITHER 0 OR 1.ONCE AGAIN Q TIMES 2
REM SHOULD BE REMOVED FROM NUMBER. IF REMAINDER IS ONE THEN IT IS ODD AS
REM IT IS NOT FULLY DIVISIBLE BY 2
CLS
10 INPUT " ENTER THE NUMBER"; N
20 FOR I = 1 TO INT(N / 2)
30 N = N - 2
40 NEXT I
50 IF N = 1 THEN PRINT "THE GIVEN NUMBER IS ODD" ELSE PRINT "THE NUMBER IS EVEN"
60 END

6

CLS
5 I = 1
6 PRINT I
10 I = I + 2
20 PRINT I
30 IF I < 8 THEN 10
40 END

7

CLS
10 LET Q = 3
20 ON Q GOTO 30, 60, 80
30 PRINT "Q"; Q
40 GOTO 20
50 Q = Q - 1
60 PRINT "Q"; Q
70 GOTO 20
75 Q = Q - 1
80 PRINT "Q"; Q
END

8

REM THIS PROGRAMME EXPLAINS "ON Q GOTO 30 20 10
CLS
10 LET Q = 4
REM ONE EXTRA TAKEN TO TELL THAT MAX WILL TAKE ALL EXTRA
20 ON Q GOTO 80, 60, 30
30 PRINT "Q=3 LAST"; Q
50 Q = Q - 1
55 GOTO 20
60 PRINT "Q=2"; Q
75 Q = Q - 1
77 GOTO 20
80 PRINT "Q=1 FIRST"; Q
85
END

9

10 CLS
20 DIM SUB$(6)
30 FOR I = 1 TO 6
40 INPUT " ENTER THE SUB"; SUB$(I)
50 NEXT I
60 CLS
70 DIM M(6)
80 FOR I = 1 TO 6
90 INPUT "THE MARKS"; M(I)
100 NEXT I
110 CLS
120 LET SUM = 0
130 FOR I = 1 TO 6
140 SUM = SUM + M(I)
150 NEXT I
160 CLS
170 LET PERCENT = SUM / 600 * 100
180 PRINT SUB$
200 PRINT "TOTAL MARKS"; SUM
210 PRINT "% OF MARKS"; PERCENT
220 END

10

10 CLS
30 DIM SUB$(6)
35 INPUT " ENTER THE SUBJECT"; SUB$(1)
40 INPUT " MARKS"; M(1)
41 INPUT "ENTER THE SUB"; SUB$(2)
42 INPUT "ENTER THE MARKS"; M(2)
43 INPUT "ENTER THE SUB "; SUB$(3)
44 INPUT "ENTER THE MARKS"; M(3)
45 INPUT "ENTER THE SUB"; SUB$(4)
46 INPUT "ENTER THE MARKS"; M(4)
47 INPUT "ENTER THE SUB"; SUB$(5)
48 INPUT "ENTER THE MARKS"; M(5)
49 INPUT "ENTER THE SUB"; SUB$(6)
50 INPUT "ENTER THE MARKS"; M(6)
51 CLS
100 LET M = M(1) + M(2) + M(3) + M(4) + M(5) + M(6)
160 CLS
170 LET PERCENT = M / 600 * 100
200 PRINT "TOTAL MARKS"; M
210 PRINT "% OF MARKS"; PERCENT
220 END

11

10 CLS
20 DIM SUB$(6)
21 DIM M(6)
30 FOR I = 1 TO 6
40 INPUT " ENTER THE SUB"; SUB$(I)
41 INPUT "ENTER THE MARKS"; M(I)
50 NEXT I
60 CLS
120 LET SUM = 0
130 FOR I = 1 TO 6
140 SUM = SUM + M(I)
150 NEXT I
160 CLS
170 LET PERCENT = SUM / 600 * 100
180 PRINT SUB$
200 PRINT "TOTAL MARKS"; SUM
210 PRINT "% OF MARKS"; PERCENT
220 END

12

10 CLS
20 DIM SUB$(6)
21 DIM M(6)
30 FOR I = 1 TO 6
40 INPUT " ENTER THE SUB"; SUB$(I)
41 INPUT "ENTER THE MARKS"; M(I)
50 NEXT I
60 CLS
120 LET SUM = 0
130 FOR I = 1 TO 6
140 SUM = SUM + M(I)
150 NEXT I
160 CLS
171 FOR I = 1 TO 6
180 PRINT SUB$(I)
190 PRINT M(I)
192 NEXT I
200 PRINT "TOTAL MARKS"; SUM
201 LET PERCENT = SUM / 600 * 100
210 PRINT "% OF MARKS"; PERCENT
220 END

13

CLS
INPUT "ENTER ANY NUMBER="; N
INPUT "ENTER POWER="; P
LET M = 1
FOR I = 1 TO P
LET M = M * N
NEXT I
PRINT M
END

14

REM THIS PROG CLEARLY TELLS APPLICATION OF RIGHT,LEFT,MID COMMAND
CLS
A$ = "PROGRAMMING IS FUN"
B$ = RIGHT$(A$, 3)
C$ = MID$(A$, 12, 4)
REM GO TO SPACE JUST AFTER PROGRAMMING(11),SPACE+2+SPACE=4
D$ = LEFT$(A$, 11)
F$ = B$ + C$ + D$
PRINT F$
END

15

REM ADD TWO STRINGS PRINT IT AND ITS LENGTH
CLS
10 LET A$ = "MICRO"
20 LET B$ = "COMPUTER"
40 GOSUB 100
50 PRINT C$
60 PRINT D
70 END
100 C$ = A$ + B$
120 D = LEN(C$)
130 RETURN

16

REM..REPEATED PROG
CLS
10 A$ = "NEW DELHI"
20 B$ = " RAILWAY STATION"
30 GOSUB 100
40 PRINT D
50 END
100 C$ = A$ + B$
110 PRINT C$
120 D = LEN(C$)
130 RETURN

17

REM REPEATED
CLS
10 A$ = "NEW DELHI RAILWAY STATION"
20 GOSUB 100
30 PRINT B
40 END
100 B = LEN(A$)
120 RETURN

18

10 I = 1
20 I = I + 2
25 PRINT " "; I
30 S = I * I
40 PRINT S
50 IF I < 31 THEN 20
60 END
CLS

19

CLS
INPUT "ENTER ANY POWER "; P
INPUT " ENTER ANY NUMBER "; N
LET M = 1
FOR I = 1 TO P
LET M = M * N
NEXT I
PRINT M
END

20

CLS
FOR I = 99 TO 1 STEP -2
PRINT I;
SUM = SUM + I
NEXT I
PRINT SUM
END

 

MORE PROGRAMS  More Basic Programs

Fill up the Feedback Form to send your Suggestions or Coments or anything you want to convey us.Send such programs if you have

Kid's Home Page

 

 

 

 

 

 

Home Page

Hotels & Resorts

Marble

Industries

Hospital & Doctor

Handicrafts

Jewellers

Restaurant / Bar

Schools / Colleges

Computer Institue

Business Listing

Classifieds


What's New ?

Kids Corner

Out & About Udaipur

Visitors to Udaipur

Useful websites


NetTalk

Thoughts of day


Personalities


Yellow Pages


Paintings

Photo Gallary

Cricket

Cartoon corner

News


Online  directory

Weather


Suggest this site

Contact