Go to home page of Udaipurplus.com

 

 

PAGE - 2

 

1

REM THIS PROGRAMM COMPARES TWO NUMBERS. "=" NOT TOLD IN CLASS?
CLS
10 : INPUT "ENTER THE FIRST NO Q"; Q
20 : INPUT "ENTER THE SECOND NO W"; W
30 : IF Q > W THEN 40 ELSE 60
40 : PRINT "Q >W"
50 : GOTO 70
60 : IF Q = W THEN 65 ELSE 66
65 : PRINT "W=Q"
67 : GOTO 70
66 : PRINT "Q<W"
70 : END

2

REM THIS PROGRAMME INPUTS EMPLOYEE'S NAME AND CALCULATES SALARY AS PER GREADE
CLS
10 INPUT "ENTER THE NO OF EMP"; N
20 FOR I = 1 TO N
30 INPUT "ENTER THE NAME OF EMP"; S$
40 INPUT "ENTER THE GRADE"; G
50 ON G GOTO 60, 80, 100
60 BASIC = 1600
70 GOTO 110
80 BASIC = 2400
90 GOTO 110
100 BASIC = 3200
110 DA = 70 / 100 * BASIC
120 HRA = 50 / 100 * BASIC
130 TOTAL = DA + HRA + BASIC
140 PRINT "TOTAL SALARY"; TOTAL
150 NEXT I
160 END

3

REM INCOMPLETE..MERGE EMPLOYEE CODE TO PREVIOUS PROGRAMME
CLS
INPUT "ENTER NO OF EMPLOYEE"; N
FOR I = 1 TO N
INPUT "ENTER EMLOYEE NAME "; E$
INPUT "ENTER EMPLOYEE CODE"; C
BASIC = 1600
DA = 170 / 100 * 1600
HRA = 10 / 100 * 1600
T = BASIC + DA + HRA
PRINT " NAME ....."; E$
PRINT "CODE...."; C
PRINT "TOTAL...."; T
NEXT I
END

4

REM NOT IN COURSE
CLS
5 FOR Q = 1 TO 2
20 PLAY "ABCDE"
40 SCREEN 1
50 CIRCLE (100, 100), 100
60 CIRCLE (70, 80), 20
70 PAINT (70, 78), 20
80 CIRCLE (120, 78), 20
90 PAINT (120, 80), 20
110 CIRCLE (100, 120), 30
120 CIRCLE (100, 160), 15
125 PRINT "YOU ARE GOOD GIRL RUPAL"
126 NEXT Q
130 END
5
REM FACE DRAW
CLS
5 FOR Q = 1 TO 2
20 PLAY "AB"
40 SCREEN 1
50 CIRCLE (100, 100), 100
60 CIRCLE (70, 80), 20
70 PAINT (70, 78), 20
80 CIRCLE (120, 78), 20
90 PAINT (120, 80), 20
110 CIRCLE (100, 120), 30
120 CIRCLE (100, 160), 15
121 PRINT "YOU ARE GOOD"
122 NEXT Q
123 SCREEN 2
124 FOR I = 1 TO 100
125 CIRCLE (100 + I, 100), 300
126 CIRCLE (100 + I, 100), 159
127 NEXT I
128 PRINT "WE HOPE YOU LIKED THIS"
130 END

6

REM SUM OF FIRST 50 EVEN NUMBERS
CLS
FOR A = 1 TO 50
LET Z = 2 * A
LET SUM = SUM + Z
NEXT A
PRINT "SUM"; SUM
END

7

REM SUM OF FIRST ODD NUMBERS
FOR A = 1 TO 100
LET Z = 2 * A - 1
PRINT Z
NEXT A
END

8

REM REPEAT PROG ..TELLS LENGTH OF THE STRING
CLS
INPUT "ENTER ANY STRING"; A$
LET B = LEN(A$)
PRINT "THE STRING IS "; A$
PRINT "THE LENGTH IS"; B
END

9

REM THIS IS A PROJECT NOT IN COURSE
10 REM this program plots a histogram
20 REM the y-axis is horizontal and x-axis vertical
30 FOR I = 0 TO 40 STEP 10
40 PRINT TAB(I + 11); I;
48 NEXT I
50 PRINT TAB(11); "------------------------------------------------------"
60 PRINT
70 FOR I = 1 TO 4
80 READ N$, P
90 LET R = INT(P + .5)
100 FOR J = 1 TO 5
110 IF (J <> 3) THEN 130
120 PRINT TAB(4); N$;
130 FOR K = 1 TO R
140 PRINT TAB(10 + K); "*";
150 NEXT K
160 PRINT
170 NEXT J
180 NEXT I
190 PRINT TAB(11); "-----------------------------------------------------"
200 PRINT
210 DATA "1951",18.7,"1961",22.4,"1971",28.2,"1981",35.6
220 END

10

CLS
DIM A(20)
FOR I = 1 TO 20
LET A(I) = I * I
NEXT I
CLS
LET SUM = 0
FOR I = 1 TO 20
SUM = SUM + A(I)
NEXT I
FOR I = 1 TO 20
PRINT A(I)
PRINT SUM
NEXT I
END

11

REM SUM OF RAISE TO POWER FOUR UPTO NUMBER SPECIFIED
REM SIMILARLY TRY SQ,CUBE,SIMPLE SUMS, SUM OF ODDS,EVENS IN FIRST Q
REM NATURAL NUMBERS..
CLS
INPUT "ENTER THE NUMBER "; Q
FOR I = 1 TO Q
SUM = 0
SUM = SUM + I ^ 2 * I ^ 2
PRINT SUM;
NEXT I
END

12

REM TAKE A STRING,FIND LENGTH,GO LEFT & START,FIRST>1,SECOND>2,....
CLS
INPUT "ANY STRING"; A$
LET B = LEN(A$)
FOR I = 1 TO B STEP 1
LET C$ = LEFT$(A$, I)
PRINT C$
NEXT I
END

13

REM REPEATED PROG TAKE A STRING,GO LEFT,COUNT NUMBER OF CHAR TO BE PRINTED
CLS
LET Q$ = "RAJAT"
LET W$ = LEFT$(Q$, 2)
PRINT W$
END

14

REM REPEATED PROG .. LENGTH OF GIVEN STRING
CLS
LET D$ = "RAJAT"
A = LEN(D$)
PRINT A
END

15

REM CAL LENGTH OF STRING,GO TO LEFT,GO TO LENGTH OF STRING FROM THERE
REM AND THEN START REDUCING ONE BY ONE FROM LEFT
CLS
LET A$ = "RAJAT SHUKLA"
LET C = LEN(A$)
FOR D = C TO 1 STEP -1
LET C$ = LEFT$(A$, D)
PRINT C$
NEXT D
END

16

REM TAKE LENGTH OF STRING,GO TO RIGHT,FROM THE LAST CHAR COUNT
REM LENGTH OF STRING AND START REDUCING ONE BY ONE
CLS
LET A$ = " RAJAT SHUKLA"
LET C = LEN(A$)
FOR D = 1 TO C
LET C$ = RIGHT$(A$, D)
PRINT C$
NEXT D
END

17

REM APPLICATION OF LEFT$,RIGT$,LEN$
CLS
LET Q$ = "PROGRAMMING IN BASIC IS INTERESTING"
LET E$ = LEFT$(Q$, 11)
LET Y$ = " "
LET R$ = RIGHT$(Q$, 14)
LET T$ = E$ + Y$ + R$
PRINT T$
LET L = LEN(T$)
PRINT L
END

18

REM FIND MAXIMUM OUT OF GIVEN NUMBERS
LET MAX = 1
INPUT "ENTER HOW MANY NOS.="; N
FOR I = 1 TO N
INPUT "ENTER THE NUMBER"; NUMBER
IF NUMBER > MAX THEN MAX = NUMBER
NEXT I
PRINT MAX
END

19

REM ONLY FOR UNDERSTANDING.. EARLIER PROG USES GOSUB+RETURN TO DO THE SAME.....
CLS
10 INPUT "ENTER FIRST NUM(A)"; A
20 INPUT "ENTER SECOUND NUM(W)"; W
30 INPUT "ENTER THIRD NUM(E)"; E
100 MAX = 0
110 IF MAX < A THEN MAX = A
120 IF MAX < W THEN MAX = W
130 IF MAX < E THEN MAX = E
131 PRINT "LARGEST NUMBER"; MAX
140 END

20

REM REPEATED PROG..REACH IN MIDDLE POSITION OF STRING AS TOLD BY SECOND ENTRY,
REM PRINT NUMBER OF CHARS FROM THERE AS SPECIFIED BY THIRD ENTRY..
CLS
LET W$ = "MANGO"
LET Q$ = MID$(W$, 2, 3)
PRINT Q$
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