Gw Basic Programs For 10th Class

Posted on by

10TH CLASS COMPUTER SCIENCE Important MCQs Chapter # 1 Problem Solving Chapter # 2 Data types, I/O statements Chapter # 3 Control Structure. Riaz Ali Soomro Study Material. Search this site. Data Structures. Matric Class. GW BASIC Programs. MS Office 2013 Book. GW BASIC Programs. Punjab Computer Science Online Test 1. Class Chapter 2 Data Types, Assignment, Input Output Statements. Computer Science Punjab Computer Science Online Test 1. Problem solving In GW Basic when we write a computer program GW BASIC. GWBASIC in URDU for 10 class Part 1 CSTECHZ.

  1. Gw Basic Manual
  2. Gw Basic Programs For 10th Class In Urdu
  3. Gw Basic Programs For Class 10
  4. Gw Basic For Windows 10
  5. Gw Basic Programs For 10th Class Download

Dear students I am updating this page as well, so keep visiting this page to find/read the updated material/topics.

Download Microsoft Visual Basic for Windows now from Softonic: 100% safe and virus free. More than 17500 downloads this month. Download Microsoft Visual Basic latest version 2018. Visual basic 2010 free download utorrent latest. Download Visual Basic 2010 Torrent in HD Quality and All Available Formats. Visit us for More Fresh Torrents. Download Visual Studio professional by uTorrent. Visual Studio 2017 Professional Free Download. And download Visual Studio 2010.

=> Code to write the ASCII Code and their respective Characters (using Sub-routines)

10 PRINT 'ASCII CODE','CHARACTER'

20 FOR K=65 TO 90

30 GOSUB 60

40 NEXT K

50 END

60 PRINT K,CHR$(K)

70 RETURN



Here the function CHR$ converts the number passed from its arguments, means from '()' brackets, to its equivalent CHARACTER.
Reverse of this is ASC function which converts the CHARACTER passed from its arguments to its equivalent ASCII CODE
Example is given below
10 INPUT 'ENTER ANY CHARACTER';C$
20 PRINT 'THE ASCII CODE OF CHARACTER IS';ASC(C$)


You can see from the above output that when we INPUT the character T (capital T) then it is showing its ASCII CODE, that is, 84. And when we INPUT the character s (small s) then it shows ASCII CODE 115, that is code of small s (because the ASCII CODES of small ABC range between 97 to 122)
=> Code to INPUT a string and PRINT it in reverse order (like NATSIKAP forPAKISTAN)
10 INPUT 'ENTER ANY STRING';ST$
20 FOR J=LEN(ST$) TO 1 STEP -1
30 PRINT MID$(ST$,J,1);
40 NEXT J
50 END

Output
=> Code to PRINT any STRING in triangle format, like following format
Like if we INPUT the string PAKISTAN then the output will be
P
PA
PAK
PAKI
PAKIS
PAKIST
PAKISTA
PAKISTAN
Code
10 INPUT 'ENTER ANY STRING';ST$
20 FOR OUTER=1 TO LEN(ST$)
30 FOR INNER=1 TO OUTER
40 PRINT MID$(ST$,INNER,1);
50 NEXT INNER
60 PRINT
70 NEXT OUTER
80 END

Output

Now to print the triangle in REVERSE order use the following code (modified code is highlighted)

10 INPUT 'ENTER ANY STRING';ST$
20 FOR OUTER=LEN(ST$) TO 1 STEP -1
30 FOR INNER=1 TO OUTER
40 PRINT MID$(ST$,INNER,1);
50 NEXT INNER
60 PRINT
70 NEXT OUTER
80 END

Output
=> Code to INPUT 5 subjects and then PRINT any RANDOM subject out of those
10 RANDOMIZE TIMER
20 DIM SUB$(5)
30 FOR K=0 TO 4
40 INPUT SUB$(K)
50 NEXT K
60 PRINT 'RANDOMLY SELECTED SUBJECT IS ';SUB$(INT(RND*5))
70 END

Output

=> Code to sort the numbers, arrange them in ascending order, (using arrays)

10 DIM NUM(5)

20 FOR K=0 TO 4

30 INPUT NUM(K)

40 NEXT K

Tags: 2006 FIFA World Cup PC download free, 2006 FIFA World Cup PC download torrent, 2006 FIFA World Cup PC free download, 2006 FIFA World Cup PC torrent. FIFA 06 PC Free Download PC Game Cracked in Direct Link and Torrent. FIFA 06 PC is the official video game for the 2006 FIFA World Cup. Fifa 2006 world cup game. 8 Shares Share Tweet Share Share E-mail Feedback A little about five weeks from now, the 2006 FIFA Globe Cup will kick off in Munich when the tournament’s German hosts take on Costa Rica.

50 FOR I=1 TO 4

60 FOR J=0 TO 4-I

70 IF NUM(J) >NUM(J+1) THEN LET TMP=NUM(J):NUM(J)=NUM(J+1):NUM(J+1)=TMP

80 NEXT J

90 NEXT I

100 PRINT'NUMBERS IN ASCENDING ORDER ARE'

110 FOR H=0 TO 4

120 PRINT NUM(H)

130 NEXT H

140 END


Output
Using almost the same program you can find the Greatest number and the Smallest number. You just have to sort the array in ASCENDING order first, then the 1st element of array will be the smallest and the last element of array will be the greatest or largest element (because the array is already sorted and we know that the smallest element comes at the 1st position and largest element will be at the last position of array).
Code with some modification (highlighted text) is shown below:
10 DIM NUM(5)
20 FOR K=0 TO 4
30 INPUT NUM(K)
40 NEXT K
50 FOR I=1 TO 4
60 FOR J=0 TO 4-I
70 IF NUM(J) > NUM(J+1) THEN LET TMP=NUM(J):NUM(J)=NUM(J+1):NUM(J+1)=TMP
80 NEXT J
90 NEXT I
100 PRINT 'NUMBERS IN ASCENDING ORDER ARE'
110 FOR H=0 TO 4
120 PRINT NUM(H)
130 NEXT H
140 PRINT 'THE SMALLEST ELEMENT IS ';NUM(0)
150 PRINT 'THE LARGEST ELEMENT IS ';NUM(4)

160 END

Output

Programs for the 10th class Punjab Text Book exercises .......
10 REM find sum of TEN values using READ/DATA
20 READ V1,V2,V3,V4,V5,V6,V7,V8,V9,V10
30 SUM=V1+V2+V3+V4+V5+V6+V7+V8+V9+V10
40 DATA 1,2,3,4,5,6,7,8,9,10
50 PRINT 'SUM :'SUM
60 END
10 REM student information,total and percentage of Marks
20 PRINT 'Enter data about Student ...'
30 INPUT 'Enter Name :';stName$
40 INPUT 'Enter Roll No:';rno
50 INPUT 'Enter CLASS:';CLASS
60 INPUT 'Enter SECTION:';SEC$

70 PRINT 'Enter ';stName$'s Marks against Subjects..'
80 INPUT 'ENGLISH ----- out of 150 :';ENG
90 INPUT 'URDU -------- out of 150 :';U
100 INPUT 'ISLAMYAT ---- out of 75 :';I
110 INPUT 'PAKSTUDIES -- out of 75 :';PK
120 INPUT 'COMPUTER ---- out of 150 :';COMP
130 INPUT 'PHYSICS ----- out of 150 :';PHY
140 INPUT 'CHEMISTRY --- out of 150 :';CH
150 INPUT 'MATH -------- out of 150 :';M
160 TOTAL=ENG+U+I+PK+COMP+PHY+CH+M
170 PERC=(TOTAL/1050)*100
180 PRINT '...STUDENT INFORMATION...'
190 PRINT 'Name :';stName$
200 PRINT 'Roll NO :';rno
210 PRINT 'CLASS :';CLASS
220 PRINT 'SECTION :';SEC$
230 PRINT 'TOTAL achieved Marks :';TOTAL
240 PRINT 'Percentage :';PERC
250 END
10 REM S=VT
20 INPUT 'Enter SPEED of car (m/s) :';V
30 INPUT 'Enter given TIME in seconds :';T
40 S=V*T
50 PRINT 'Distance Coverd is :'S'm'
60 END
10 REM area of cylinder
20 INPUT 'Enter Radius of cylinder (in cm):';r
30 INPUT 'Enter Height of cylinder (in cm):';h
40 volume=3.142857*r*r*h
50 PRINT 'Volume of the Cylinder :';volume
60 END
10 REM square of a Number
20 INPUT 'Enter Number to find it's SQUARE :';n
30 square=n*n
40 PRINT 'SQUARE for ';n' is :';square
50 END
10 REM sum and average using LET
20 LET n1=4
30 LET n2=6
40 LET n3=5
50 LET sum=n1+n2+n3
60 LET avg=sum/3
70 PRINT 'Sum :';sum
80 PRINT 'Average :';avg
90 END
10 REM area of triangle
20 INPUT 'Enter the BASE of the Triangle :';b
30 INPUT 'Enter the Altitude of the Triangle :';a
40 area=(1/2)*b*a
50 PRINT 'Area of Triangle :';area
60 END
10 REM area AND circumference of the Circle 1
20 INPUT 'Enter the Radius of the Circle :';r
30 PI=3.14
40 AREA=PI*r*r
50 CF=2*PI*r
60 PRINT 'Area of the Circle having Radius 'r' is :'AREA
70 PRINT 'Circumference of the Circle having Radius 'r' is :'CF
80 END
10 REM first Ten ODD Numbers
20 PRINT 'First Ten ODD Number are .....'
30 C=1
40 X=1
50 WHILE C<=10
60 IF X MOD 2<>0 THEN 70 ELSE 90
70 PRINT X;
80 C=C+1
90 X=X+1
100 WEND
110 END


10 REM first Ten ODD Numbers
20 PRINT 'First Ten ODD Number are .....'
30 C=1
40 WHILE C<=20
50 PRINT C;
60 C=C+2
70 WEND
80 END
10 REM sum of squares of first Five Even Numbers
20 SUM=0
30 C=2*5
40 FOR X=2 TO C STEP 2
50 SUM=SUM+(X*X)
60 NEXT X
70 PRINT 'Sum OF Squares of First Five Even Numbers :';SUM
80 END
10 REM Larger of TWO Numbers
20 INPUT 'Enter the 1st Number :';X
30 INPUT 'Enter the 2nd Number :';Y
40 IF X>Y THEN larg=X
50 IF Y>X THEN LARG=Y
60 IF X=Y THEN 80
70 PRINT 'Larger Value is :';LARG:END
80 PRINT 'Your Both Values are equal':END
10 REM Table of a given Number
20 INPUT 'Enter the Table Number :';t
30 FOR x=1 TO 10 STEP 1
40 PRINT T' X 'x' = 't*x
50 NEXT x
60 END
10 REM grade system
20 PRINT 'Enter Your Marks against the Subjects..'
30 INPUT 'ENGLISH ----- out of 150 :';ENG
40 INPUT 'URDU -------- out of 150 :';U
50 INPUT 'ISLAMYAT ---- out of 75 :';I
60 INPUT 'PAKSTUDIES -- out of 75 :';PK
70 INPUT 'COMPUTER ---- out of 150 :';COMP
80 INPUT 'PHYSICS ----- out of 150 :';PHY
90 INPUT 'CHEMISTRY --- out of 150 :';CH
100 INPUT 'MATH -------- out of 150 :';M
110 TOTAL=ENG+U+I+PK+COMP+PHY+CH+M
120 PERC=(TOTAL/1050)*100
130 PRINT '...Your Result is ...'
140 PRINT 'Your Percentage is :';PERC
150 IF PERC>=80 THEN PRINT 'Your Grade is : A1'
160 IF PERC>=70 AND PERC<80 THEN PRINT 'Your Grade is : A'
170 IF PERC>=60 AND PERC<70 THEN PRINT 'Your Grade is : B'
180 IF PERC>=50 AND PERC<60 THEN PRINT 'Your Grade is : C'
190 IF PERC>=40 AND PERC<50 THEN PRINT 'Your Grade is : D'
200 IF PERC<40 THEN PRINT 'Your Grade is : F'
210 END
10 REM array data in REVERSE ORDER
20 DIM arr(50)
30 INPUT 'Enter the Length of ARRAY(MAX LEN:50):';limit
40 FOR x=1 TO limit
50 PRINT 'Enter Value at INDEX ';x' :';
60 INPUT arr(x)
70 NEXT x
80 PRINT 'ARRAY in given order....'
90 FOR i=1 TO limit
100 PRINT arr(i);
120 NEXT i
130 PRINT
140 PRINT 'ARRAY in reverse order..'
150 FOR c=limit TO 1 STEP -1
160 PRINT arr(c);
170 NEXT c
180 END
10 REM select ODD numbers from a given list
20 DIM arr(12)
30 FOR x=1 TO 12
40 READ arr(x)
50 NEXT x
60 PRINT 'Complete given List is ....'
70 FOR i=1 TO 12
80 PRINT arr(i);
90 NEXT i
100 PRINT
110 PRINT 'Only ODD NUMBERS list ..'
120 FOR c=1 TO 12
130 IF arr(c) MOD 2 <> 0 THEN PRINT arr(c);
140 NEXT c

Gw Basic Manual

150 DATA 6,42,4,77,32,9,21,22,8,45,15,46
160 END
10 REM sort the list of 20 names in DESCENDING ORDER
20 REM SELECTION SORT algorithm is used
30 DIM arr$(20)
40 FOR x=1 TO 20
50 READ arr$(x)
60 NEXT x
70 PRINT 'Name List in GIVEN ORDER... '
80 FOR x=1 TO 20
90 PRINT arr$(x),
100 NEXT x
110 PRINT
120 REM SELECTION SORT algorithm
130 FOR x=1 TO 20
140 FOR y=(x+1) TO 20
150 IF arr$(x)<arr$(y) THEN 160 ELSE 190
160 temp$=arr$(x)
170 arr$(x)=arr$(y)
180 arr$(y)=temp$
190 NEXT y
200 NEXT x
210 PRINT 'Name List in DESCENDING ORDER...'
220 FOR x=1 TO 20
230 PRINT arr$(x),
240 NEXT x
250 REM use UPPER case only OR LOWER case only
260 DATA ASLAM,ASGHER,DAUD,RAMZAN,SHEHBAZ,ASGHER
270 DATA WAQAR,SHEHBAZ,IJAZ,KAMRAN,USMAN,ZAHID,ZAID
280 DATA AKHTER,TALHA,HAMZA,SHABEER,ALI,HAMZA,RIZWAN
290 END
10 REM set the array of 20 names in DESCENDING ORDER

Gw Basic Programs For 10th Class In Urdu

20 REM SELECTION SORT algorithm is used
30 DIM arr$(20)
40 PRINT 'Enter Name List of 20 names'
45 PRINT 'PLZ ! Enter Names in UPPER only OR in LOWER case only'
50 FOR x=1 TO 20
60 PRINT 'Enter Name 'x;
70 INPUT ' :';arr$(x)
80 NEXT x
90 PRINT 'Name List in GIVEN ORDER ... '
100 FOR x=1 TO 20
110 PRINT arr$(x),
120 NEXT x
130 PRINT
140 REM SELECTION SORT algorithm
150 FOR x=1 TO 20
160 FOR y=(x+1) TO 20
170 IF arr$(x)<arr$(y) THEN 180 ELSE 210
180 temp$=arr$(x)
190 arr$(x)=arr$(y)
200 arr$(y)=temp$
210 NEXT y
220 NEXT x
223 PRINT 'Name List in DESCENDIG ORDER ..'
230 FOR x=1 TO 20
240 PRINT arr$(x),

Gw Basic Programs For Class 10


250 NEXT x

Gw Basic For Windows 10

260 END

Gw Basic Programs For 10th Class Download