GW-Basic Programs

Practical: 1- Write a Program to Print even numbers from 1 to 40.
 
Program:
10       CLS
20      FOR B = 2 TO 40 STEP 2
      30      PRINT B
      40      NEXT  B
      50      END
Algorithm
Step 1  START
Step 2  STORAGE    B=2
Step 3  DECISION    IS B<= 40 IF
NOT THEN GO TO STEP 7
Step 4  COMPUTE    B=B+2
Step 5   PRINT
STEP 6  GOTO STEP 3
Step 7 END

Algorithm

Step 1  START
Step 2  INPUT      L , W
Step 3  COMPUTE   AREA= L * W
Step 4    PRINT   AREA
Step 5  END
Practical: 11: Write a program that can calculate the perimeter of the rectangular.

Program:
10    CLS
20     INPUT “Length …=”;L
30     INPUT  “Width …=”; W
40     PERIMETER=  2* ( L+W)
50     PRINT “ PERIMETER….. =”; PERIMETER
60     END
Algorithm

Step 1  START
Step 2  INPUT      L , W
Step 3  COMPUTE   PERIMETER = 2* ( L+W)
Step 4    PRINT   PERIMETER
Step 5  END

Practical: 12: Write a program that can calculate the square and cube of any number.

Program:
10    CLS
20     INPUT “ Enter any No..…=”; N
30     Sq = N*N
40     Cub= N^3
50     PRINT “ Square….. =”; Sq
60     PRINT “ Cube….. =”; Cub
70      END
Algorithm

Step 1  START
Step 2  INPUT      N
Step 3  COMPUTE   Sq = N*N
Step 4 COMPUTE   Cub = N^3
 Step5  PRINT   Sq ,Cub
Ste 
Practical: 13: Write a program that can convert temperature from Centigrade to Fahrenheit

Program:
10    CLS
20     INPUT “ Temperature in Centigrade :=”; C
30     F = 9/5* C+32
40     PRINT “Temperature in Fahrenheit =”; F
50     END
Algorithm

Step 1  START
Step 2  INPUT      C
Step 3  COMPUTE    F = 9/5* C+32
Step 4  PRINT        F
Step 5  END
Practical: 14: Write a program that can convert temperature from Fahrenheit to Centigrade

Program:
10    CLS
20     INPUT “ Temperature in  Fahrenheit  :=”; F
30     C = 5/9* ( F-32) 
40     PRINT “Temperature in Centigrade  =”; C
50     END
Algorithm

Step 1  START
Step 2  INPUT      F
Step 3  COMPUTE    C = 5/9* ( F-32)
Step 4  PRINT        C
Step 5  END
Practical: 15:  Write a program that can draw a Triangle.

Program:
10    CLS
20     SCREEN 2
30     LINE  (110,50)- (160,100) 
40     LINE  (60,100)- (160,100)
50     LINE  (110,50)- (60,100) 
60     END

Algorithm
Step 1      START
Step 2       PRINT SCREEN 2
Step 3       OUTPUT       LINE (110, 50) - (160,100) 
                                 LINE (60,100) - (160,100)
                                 LINE (110, 50) - (60,100) 

Step 4            END
Practical: 16:  Write a program that can draw a Rectangle.
Program:
10    CLS
20     SCREEN 2
30     LINE  (70,80)- (190,170),,B 
40        END
Algorithm
Step 1      START
Step 2       PRINT SCREEN 2
Step 3       OUTPUT       LINE (70, 80) - (190,170),, B 
Step 4       END
Practical: 17: Write a program that can add 15+ 30+20+325.

Program:
10    CLS
20     READ A,B,C,D
30     SUM= A+B+C+D 
40      PRINT “SUM OF 15,30,20 AND 325 IS…=”; SUM
50      DATA 15,30,20,325
60       END
Algorithm
Step 1      START
Step 2       STORAGE       A=1
Step 3       DECISION      IS A <=4, IF NOT THEN GOTO STEP 8 
Step 4       COMPUTE      A=A+1
 Step 5       COMPUTE     SUM = SUM +5^A
 Step 6        PRINT   5^A, SUM
 Step 7       GOTO STEP 3
Step  8        END
Practical: 18: Write a program that can print all odd numbers from 1 to 100.

Program:
10    CLS
20    FOR N = 1 TO 100 STEP 2
30    PRINT       N  
40     NEXT   N
50      END
Algorithm
Step 1      START
Step 2       STORAGE       N=1
Step 3       DECISION      IS N <=100, IF NOT THEN GOTO STEP 7 
Step 4       COMPUTE      N=N+2
 Step 5       PRINT            N
 Step 6        GOTO STEP 3
 Step 7        END
Practical: 19: Write a program that can print all even numbers from 2 to 100.

Program:
10    CLS
20    FOR  B =  2 TO 100 STEP 2
30    PRINT       B  
40     NEXT   B
50      END
Algorithm
Step 1      START
Step 2       STORAGE       B=2
Step 3       DECISION      IS B <=100, IF NOT THEN GOTO STEP 7 
Step 4       COMPUTE      B=B+2
 Step 5       PRINT            B
 Step 6        GOTO STEP 3
 Step 7        END
Practical:20:  program that can Print you name five times using FOR-NEXT Loop.

Program:
10    CLS
20    FOR   N =1 TO 5
30    PRINT    “GOD IS GREAT”
40     NEXT   N
50      END
Algorithm
Step 1      START
Step 2       STORAGE       N=1
Step 3       DECISION      IS N<=5, IF NOT THEN GOTO STEP 7 
Step 4       PRINT               GOD IS GREAT
 Step 5      COMPUTE       N=N+1
 Step 6        GOTO STEP 3
 Step 7        END

Practical:2 :Write a Program to add two numbers.

Algorithm

Step 1  START
Step 2  INPUT   N1 ,N2   B=2
Step 3  COMPUTE     SUM N1+N2
Step 4  PRINT  SUM
Step 5 END
Practical: 3: Write such program which can read six numbers and print their average.
Algorithm

Step 1  START
Step 2  INPUT       N1, N2, N3, N4, N5, N6
Step 3  COMPUTE     AVG=( N1+N2+N3+N4+N5+N6) /6
Step 4  PRINT             AVG
Step 5  END
Practical: 4: Write a program which can find the largest number of given three numbers.
Algorithm

Step 1  START
Step 2  INPUT       N1, N2, N3
Step 3  DECISION  IS N1> N2 AND N1 > N3 IF YES THEN  PRINT  N1
Step 4  DECISION  IS N2> N1 AND N2 > N3 IF YES THEN  PRINT  N2
Step  5 ELSE PRINT  N3
Step 6  END
Practical: 5: Write a program that can calculate the sum and average of four numbers.
Algorithm

Step 1  START
Step 2  INPUT       N1, N2, N3, N4
Step 3  COMPUTE     SUM= N1, N2, N3, N4
Step 4  COMPUTE   AVG= SUM/4
Step 5  PRINT  SUM,AVG
Step 6 END
Practical: 6: Write a program that can draw a circle in a square.
Program:
10    CLS
20     SCREEN 2
30      CIRCLE  ( 100,100), 50
40      LINE ( 168,35)- (472,165),,B
50      END
Algorithm

Step 1  START
Step 2  PRINT     SCREEN 2
Step

3  PRINT      CIRCLE
(100,100),50
Step 4  PRINT       LINE (168,35)- (472,165),,B
Step 5  END
Practical: 7: Write a program that can calculate the area of a circle.
Algorithm

Step 1  START
Step 2  INPUT    N=R
Step 3  COMPUTE   AREA =3.14*R*R
Step 4  PRINT          AREA
Step 5  END
Practical: 8: Write a program that can draw a circle.
Program:
10    CLS
20     SCREEN 2
30      CIRCLE  ( 100,100), 50
40      END
Algorithm

Step 1  START
Step 2  PRINT     SCREEN 2
Step

3  PRINT      CIRCLE
(1000,100),50
Step 4  END
Practical: 9: Write a program that can find the value of a solid cylinder
Algorithm

Step 1  START
Step 2  INPUT      R , H
Step 3  COMPUTE VOL= 3.14*R^2*H
Step 4    PRINT  VOL
Step 5  END
Practical:10: Write a program that can calculate the area of a rectangle
Practical:11: Write a program to show 1st ten odd numbers using while wend loop.

243 comments:

  1. i need a program to write 1st 10 odd number using whil wend loop
    plz tell me on my contact number via SMS
    03425111231

    ReplyDelete
  2. 10 n=1
    20 while n<=20
    30 print n
    40 n=n+2
    50 wend
    60 end

    ReplyDelete
  3. a program to print a list of odd numbers from the given numbers using arrays
    6,42,4,77,32,9,21,22,8,45,15,46
    (thanks)Musa raza shah

    ReplyDelete
    Replies
    1. Dear student check ch#4Q#14 in my BLOG ARCHIVE.

      Delete
    2. 10 cls
      20 for i=1 to 12
      30 read A(i)
      40 next i
      50 for i=1 to 12
      60 print a(i)
      70 next i
      80 data 6,42,4,77,32,9,21,22,8,45,15,46
      90 end

      Delete
  4. there is a problem in circle program algorithm its not 1000 its 100

    ReplyDelete
    Replies
    1. yes right...it was typing mistake....but thanks

      Delete
  5. i need a program to produce the sum of first 10 natural numbers.. plz upload it as sooon as possible!

    ReplyDelete
    Replies
    1. 10 REM * PROGRAM TO PRODUCE SUM OF NUMBERS * 20 CLS
      30 PRINT “NUMBERS”
      40 PRINT “~~~~~~~~~”
      50 FOR N = 1 TO 10
      60 SUM = SUM + N
      70 PRINT N
      80 NEXT N
      90 PRINT TAB(30); “---------“
      100 PRINT “SUM OF FIRST TEN NATURAL NUMBERS IS “;SUM 110 PRINT TAB(30); “---------“

      Delete
  6. This comment has been removed by the author.

    ReplyDelete
  7. 0 for i=1 to 10
    20 n=n+i
    30 next i
    40 print n
    50 end

    ReplyDelete
  8. Salam,
    what is an array? How it can be created and what r their uses ?
    Plz contact 03347562076
    abdurrehman.shahbaz@yahoo.com

    ReplyDelete
    Replies
    1. an array is collection of variables that can store data of same type

      Delete
  9. "An array is collection of variables with the same variable name and data type"
    AN array is represented in computer memory by a set of consecutive memory locations. The memory locations are referred to as element of an array. Each element of an array has a unique storage location in memory and can hold single value.Each location is identified by its position value is called subscript or index.
    Uses:
    Array is used to store same kind of data in one variable. This stores computer's memory. For example you want to store 100 names of students in through basic. For this you have to allocate 100 variables.It means 100 memory locations are allocated. In this way we consume a lot of system memory if we use an array it will be save our memory and all variables of same data type will combine in one place. We fill array by using loops.

    ReplyDelete
  10. What is foreground and background ? Plz upload it as soon as possible...

    ReplyDelete
  11. Foreground is area in which you are writing something or graphing....all characters are said to b foreground where as behind the characters the empty area is called background.

    ReplyDelete
  12. your program is good.
    I'm asking you to that why is used for colon(:) between for and next loop

    ReplyDelete
    Replies
    1. Dear student your question is not clear that what are you asking. Colon is always used to write multiple statement in one line.

      Delete
  13. I WANT PROGRAM FOR DRAWING A FIVE SIDED STAR IN GW-BASIC !

    ReplyDelete
    Replies
    1. 10 screen 2
      20 pset(100,50)
      30 draw"R100 G50 H50 BD40 R100 H50 G50"
      40 End

      Delete
    2. This star will not draw by the DRAW STATEMENT
      it will draw by using LINE STATEMENT by specifying coordinates according to the selected screen (TRUST ME)!!
      I will suggest SCREEN 7 with resolution 320*200 and has 16 colors
      THANKS
      BY USING DRAW STATEMENT a six side star will draw like two opposites triangles

      Delete
  14. i want program 2 find average of 5 numbers

    ReplyDelete
    Replies
    1. 10 CLS
      15 N=0
      20 FOR L = 1 TO 5 STEP 1
      30 INPUT "ENTER ANY NUM";NUM
      40 N=N+NUM
      50 NEXT L
      60 AVG= N/5
      70 PRINT "AVG=,,,,,,,";AVG
      80 END

      Delete
  15. Check practical#3 from above.Just you have to take input n5 and in sum add n5 and in average devide it by 5.

    ReplyDelete
  16. i need a program to print a circle inside a square.

    ReplyDelete
  17. i dont know from where i should strt my preparation give me sm suggestion plz

    ReplyDelete
    Replies
    1. presentation ni preparation...

      Delete
  18. Pls how do u write a program in basic to determine wether a number is an even or odd number

    ReplyDelete
    Replies
    1. 10 CLS
      20 FOR A=1 TO 20
      30 B=A MOD 2
      40 IF B=0 THEN PRINT A; "IS AN EVEN NUMBER" ELSE PRINT A;"IS AN ODD NUMBER"
      50 NEXT
      60 END

      Delete
  19. Pls reply am in need of the answer

    ReplyDelete
  20. Replies
    1. how can gwbasic be downloaded in 2007 windows reply fast please ??????????

      Delete
  21. why isn't my program for drawing a circle working? as i run it the basic closes automatically

    ReplyDelete
    Replies
    1. graphic mode in basic is not supported by windows 7.

      Delete
  22. This comment has been removed by the author.

    ReplyDelete
  23. WHAT IS THE PURPOSE OF THE PSET STATEMENT??

    ReplyDelete
    Replies
    1. pset is used to mark dot or point in basic...use with draw statement it initialize the starting point

      Delete
  24. I have few questions
    i wrote a program and saved it say "q1".now i want to make changes in this how can i open the this file

    i wrote a program but now i want to insert a new line of code in between the two lines how can i do that

    here in this blog u mentioned two modes i) direct mode ii) indirect mode
    how can use indirect mode.

    i couldnt figure out the mistake i am making
    10 screen 2
    20 for i=30 to 180 step 30
    30 circle(i,100),50
    40 next i
    50 end

    it gave me following message
    "next without For in 0"

    waiting for the reply

    ReplyDelete
    Replies
    1. there is not any error in this program.run again

      Delete
  25. i want some if then else,
    for next
    single dimension arrays
    programs fr practice as my exams are comin i m a student

    ReplyDelete
  26. need solved excercise of ch#7

    ReplyDelete
    Replies
    1. WRITE THE NAME OF CHAPTER

      Delete
    2. oky ky gwbasic 3.2 window 2006 nm save ni ho sakti kya

      Delete
  27. This comment has been removed by the author.

    ReplyDelete
  28. plz explian the execution for program of circle, triangle and rectangle..i dont know how to take values ..and which values wil b correct and why ...plz reply soon ..thanx

    ReplyDelete
    Replies
    1. for this you have to learn number of pixels in modes of basic.for example in screen mode 2 the number of pixels in rows are 200 and in columns 640.if you want draw a point in center of your screen you will take points pset(320,100). for circle
      10 circle(320,100),50
      program to draw triangle:
      for triangle we will use draw statement
      10 screen 2
      20 pset(320,100)
      30 draw"r60 g30 h30"
      similarly you can draw any thing and any where on your screen.
      .
      .
      make this practice by yourself in basic and tell me in case of any problem. Best of luck

      Delete
  29. i want a program which prints sum and average using if then else statement

    ReplyDelete
  30. I want to write a programme that print sum of square of first 5 even numbers

    ReplyDelete
    Replies
    1. 10 for i=2 to 10
      20 n=i*i+n
      50 next i
      60 print"sum of square of first 5 even numbers=";n

      Delete
  31. I want to write a programme in GWBASIC to find the sum of the series 4/5+5/6+6/7+.....+69/70.

    ReplyDelete
  32. 10 for i=4 to 69
    20 n=i/(i+1)
    30 print n
    40 a=a+n
    50 next i
    60 print"sum of series 4/5+5/6+6/7+.....+69/70=";a

    ReplyDelete
  33. i want a program to create olmpic sign please tell me ho to do............

    ReplyDelete
    Replies
    1. 10 screen 2
      20 circle(40,100),20
      30 circle(60,100),20
      40 circle(80,100),20
      50 circle(45,110),20
      60 circle(65,110),20
      70 end

      Delete
  34. 10 FOR I=1 TO 5
    20 INPUT A(I)
    30 NEXT I
    40 END
    CONVERT FOR NEXT LOOP INTO WHILE WEND LOOP...............PLZZZZZ ITZ URGENT!!!!!!!!!!!!

    ReplyDelete
    Replies
    1. 10 i=1
      20 while i<=5
      30 input a(i)
      40 i=i+1
      50 wend
      60 end

      Delete
  35. write a program that draw a star >?????????????
    plzz reply me as early as possible

    ReplyDelete
  36. PLEASE SHOW AN EASY METHOD TO WRITE PROGRAMS IN GW BASIC

    ReplyDelete
  37. write a program that draw a star > with draw statement

    ReplyDelete
  38. dear students program to draw a star is in my solution programs already.CH#6Q#11

    ReplyDelete
  39. How we make 5 circles of same centre? plz reply

    ReplyDelete
  40. see solution in my blogs's chapter#6

    ReplyDelete
  41. can you help me i have to make program that make inverted triange with 100 to 1
    like this (100 to 1)
    100 99 98 97 96
    95 94 93 92
    90 98 88
    87 86
    85

    ReplyDelete
    Replies
    1. there is not any logic of this type of question.but i'll try to make it or rather similar to this program

      Delete
  42. Mohsin Ahmed1 April 2013 09:45

    How to assign grades according to percentage in basic? I've made the whole program but the grade assigning is freaking me out :(

    ReplyDelete
    Replies
    1. post your program here then i check

      Delete
    2. This comment has been removed by the author.

      Delete
    3. 10 CLS
      20 INPUT "enter number of first subject",N1
      30 INPUT "enter number of second subject",N2
      40 INPUT "enter number of third subject",N3
      50 INPUT "enter number of fourth subject",N4
      60 INPUT "enter number of fifth subject",N5
      70 INPUT "enter total numbers of all subjects",x
      80 SUM = N1 + N2 + N3 + N4 + N5
      90 z = SUM/x
      100 c = z*100
      110 IF c>=80 GOTO 170
      120 IF c>=70 GOTO 190
      130 IF c>=60 GOTO 210
      140 IF c>=50 GOTO 230
      150 IF c>=40 GOTO 250
      160 IF c<40 GOTO 270
      170 PRINT "grade A+1"
      180 END
      190 PRINT "grade A"
      200 END
      210 PRINT "grade B"
      220 END
      230 PRINT "grade C"
      240 END
      250 PRINT"grade D"
      260 END
      270 PRINT "grade f"
      280 END

      Delete
  43. 10 CLS
    20 INPUT "enter number of first subject",N1
    30 INPUT "enter number of second subject",N2
    40 INPUT "enter number of third subject",N3
    50 INPUT "enter number of fourth subject",N4
    60 INPUT "enter number of fifth subject",N5
    70 INPUT "enter total numbers of all subjects",x
    80 SUM = N1 + N2 + N3 + N4 + N5
    90 z = SUM/x
    100 c = z*100
    110 IF c>=80 and c<=100 GOTO 170
    120 IF c>=70 and c<80 GOTO 190
    130 IF c>=60 and c<70 GOTO 210
    140 IF c>=50 and c<60 GOTO 230
    150 IF c>=40 and c<50 GOTO 250
    160 IF c<40 GOTO 270
    170 PRINT "grade A+1"
    180 END
    190 PRINT "grade A"
    200 END
    210 PRINT "grade B"
    220 END
    230 PRINT "grade C"
    240 END
    250 PRINT"grade D"
    260 END
    270 PRINT "grade f"
    280 END

    ReplyDelete
    Replies
    1. Doesn't it seem to be illogical to use so many END statements. can't we write this as ;
      110 IF C>=80 AND <=100 THEN PRINT "GRADE A": GOTO 180
      it may also reduce program lines

      Delete
    2. THANKS A LOT


      Delete
    3. Cant you simply use loop

      Delete
  44. dear student check the above program.

    ReplyDelete
  45. Replies
    1. 1*3=3
      3*9=27
      27*9=63
      63*27=1701
      up to so on...

      Delete
  46. Until a few days I used a GWBASIC program, but then it did not work anymore. There is an error message that points to a line: open SN$ for output AS#1
    Does anyone know what this means and how I can solve the problem.

    ReplyDelete
  47. Sorry, this does not work. I also get another message at line 3090 that says print ERR, ERL: STOP

    ReplyDelete
    Replies
    1. post your program after that i could say anything about error

      Delete
  48. How to fill a circle in gwbasic?

    ReplyDelete
  49. please give me about some examples of array program
    1)single dimensional array 2)double dimensional array

    ReplyDelete
  50. please reply fast of my above mention program of double and single dimensional array

    ReplyDelete
  51. plz reply fast for program that can convert temperature from Fahrenheit to Centigrade and vise versa

    ReplyDelete
  52. I WANT A PROGRAM WHICH CAN FIND THE AVERAGE

    ReplyDelete
  53. dear students all above programs are already in my blog.search them in home

    ReplyDelete
    Replies
    1. Please give us the programme of writing and printing the table of 9.
      Please help us in this problem.(Gw Basic Programming Students)>
      We will be thankful to you for this favor and it is being sold for 50000 so please help us.
      HALF of the share will be sent to ur house
      amir town lahore


      Delete
    2. 10 n=9
      20 for i= 1 to 10
      30 print n;"x";i;"=";n*i
      40 next
      hope this will help u and this site is just made for help students not for any profit.thanks for ur considerations .

      Delete
  54. Asalam Alakum,
    Madam Beenish I m very happy to see this blog.
    Allah gives you a strength to help students like me.
    Allah shower his immense blessing on you.
    Please help me to write table of any number input by user in GW-BASIC.
    Thanks For Helping students.

    ReplyDelete
    Replies
    1. 10 cls
      20 input"enter table# you want to print";t
      30 for i= 1 to 10
      40 print t;"x";i;"=";t*i
      50 next i
      60 end

      Delete
    2. pls send me the solve of question. write a program in gw basic to print list of 20 names in descending order.

      Delete
    3. 10. Cls
      20.PRINT " MY NAME IS KASHIF";f
      30PRINT " I AM NOT A TERRORIST"
      40END
      50OK

      Delete
  55. What is the purpose of RAT'S ? (Remote Administrator Tools)
    How to use them and what are there relation in Programming language ?

    ReplyDelete
  56. its purpose to hack or remote access of other system. Basically it is used by criminals. Trojan horse like virus is used as this purpose. so beware from it.

    ReplyDelete
    Replies
    1. i appreciate your knowledge

      Delete
  57. Can you please help me with a program, written in basic, to simulate a pick 6 from 45 lotto draw.
    I need to draw 18 lines of 6 and not repeat a number until the first 45 have been used.
    Thanks in advance. George

    ReplyDelete
  58. Madam I have a problem here when running graphics programs. The program is not run and error message occurs. Error message is "This system does not support full screen mode. Choose close to terminate the application".
    After closing the GW-BASIC compiler was abort.
    please tell me the solution of this problem.
    REGARDS

    ReplyDelete
    Replies
    1. nwe operating systems like windows7 does not support graphic mode in GWBASIC

      Delete
    2. I Have a Solution, you can check my blog or e-mail me

      blog: https:\\basicbeginners.blogspot.com

      e-mail: mahadkhaliqjbd@gmail.com

      Delete
  59. print 5 MOD 12
    5
    how????
    as i know it returns remainder
    plz reply

    ReplyDelete
  60. hi
    i want help in some of programs plz help me beenish mam

    ReplyDelete
  61. hi..
    Plz tell me the answer of this question...
    Q. write a program to input a number N and find its factorials??

    ReplyDelete
  62. i need program a=5 , b=8 exchanging the value of a & b without using third variable
    PlZZZZZZZZZ Help ME

    ReplyDelete
  63. i need to write a basic program
    to print odd nos from 20 to 10 using if then else statement

    ReplyDelete
  64. hi..Im student from Informatics engineering, this article is very informative, thanks for sharing :)

    ReplyDelete
  65. i need a program which can calculate a sum, product and average of 4 numbers using input statement and read data statement

    ReplyDelete
  66. i need a program which can calculate a sum, product and average of 4 numbers using input statement and read data statement

    ReplyDelete
  67. plz ap mri prgrm m help kr dy mra account name zobibutt115@yahoo.com ha

    ReplyDelete
  68. create a program to sort the data from small to large with the data 5,2,4,8,3. help me

    ReplyDelete
    Replies
    1. 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 END

      AWAIS REHMAN +92-313-8586638

      Delete
    2. write a program to sort the list of 20 names in descending order?

      Delete
    3. please send me the solution of this q.

      Delete
    4. The answer to this question is available here:
      http://www.numerical.pk/Subjects/CS/Class10th/Arrays/18.aspx

      Also visit http://www.numerical.pk/ a great website for students

      Delete
  69. WRITE A PROGRAM TO TELL THE NUM IS POSITIVE, NEGATIVE OR ZERO

    ReplyDelete
  70. A.O.A BEENISH mam its good to see your blog and i am happy with that but plz give a solution of that program {write a program in gw-basic calculating the sum and number of products given by the user in gw-basic that is used in large shopping malls}.
    city:jauharabad
    class:10

    ReplyDelete
    Replies
    1. I can help you in your project if you want!!

      Delete
  71. PLZ WRITE A PROGRAM SUM spec MULTIPLE AND DVAIDE IN ONE PROGRAM

    ReplyDelete
  72. plzz tel me thesse all ....write a method to start a basic and alo retrun to DOS
    WRITE A PROGRAM TO CALCULATE UM,MULTIPLY AND AVERAGE OF GIVEN NUMBERS.
    write a basic program to calculte the nth power of any number
    write a pragram to calculate cum of 1-30 odd numbers

    ReplyDelete
    Replies
    1. For your 1st Question, Use DOSBOX emulator, in which when the program ends, it brings the user to the DOS. Download it from here

      http://sourceforge.net/projects/dosbox/?source=dlp

      when you download this, install it and then drag and drop the GWBASIC in the DOSBOX shortcut

      For 2nd question
      05 t=0
      10 cls
      20 Rem 'A program which Sums, Multiplies and Shows Average of Given Numbers.'
      30 Read a,b,c,d,e,f,g,h,i
      40 S=a+b+c+d+e+f+g+h+i
      50 P=a*b*c*d*e*f*g*h*I
      60 A=S/9
      70 Print"Sum of the Numbers= ";S
      80 print"Products of the Numbers= ";P
      90 Print"Average of the Numbers= ";A
      100 Data 12,3,6,2,88,6,10,23,58
      110 End

      I did not understand the next question

      For last Question:
      10 cls
      20 For I=1 to 30 step 2
      30 S=S+I
      40 Print"Sum of 1-30 odd numbers= ";S
      50 End

      Delete
  73. you can check my blog at http:\\basicbeginners.blogspot.com for these programs

    ReplyDelete
  74. Replies
    1. I have made such a program you can e-mail me or check my blog at http:\\basicbeginners.blogspot.com
      click on special programs tab

      Delete
  75. Q: wrrite an algorithm to sum array A elements and array B element in basic

    ReplyDelete
  76. write a program to demonstrate simple arithmetic operations

    ReplyDelete
  77. write a program to calculate the area of triangle ?

    ReplyDelete
    Replies
    1. write a program to calculate the volume of cylinder ..

      Delete
  78. write a program to calculate the speed of an object

    ReplyDelete
  79. write a program to calculate the conversion of temperature from C to F and vice-versa...

    ReplyDelete
    Replies
    1. http://basicbeginners.blogspot.com/p/special-programs.html

      Delete
  80. write a program to demonstrate use of formatted input/output statements ?

    ReplyDelete
  81. calculation of grades of class for different students ?

    ReplyDelete
  82. write a program to calculate selection of the largest number out of given 12 numbers without using list 1,2,3,4,5,6,7,8,9,10,11,12

    ReplyDelete
  83. write a program to for the use of iteration of statement (read 5 values from keyboard and find their mean gravity and compare the mean value against actual value 9.8 meters/sec square ).....

    ReplyDelete
  84. write a program which reads 12 values in an array and after doing some arithmetic operations print the desired results .....

    ReplyDelete
  85. HOW CAN WE DOWNLOAD GW BASIC 2007 ON OUR DESKTOP PLEASE REPLY FAST ??

    ReplyDelete
    Replies
    1. 2007 basic program is not available yet .

      Delete
    2. the pg is available on site gw basicpg

      Delete
  86. plzz i want a quick reply

    ReplyDelete
  87. MAM write a basic language program to read 15 numbers in an array named NUM
    Sort the numbers in ascending order and print the out put.

    ReplyDelete
  88. All the information about GW Basic is great. Thanks a lot....

    ReplyDelete
  89. i need help in these problems..
    write a program to get two numbers add all numbers b/w two given numbers and print result.
    Read the name of ten countries and their capitals in arrays and display them on the screen.
    Write a basic program to display 3 roll numbers and student's name from an array and print them on the screen.....
    plz quickly reply.....

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. 1)
      10 CLS
      20 INPUT"ENTER A STARTING NUMBER=",A
      30 INPUT"ENTER A STOPPING NUMBER=",B
      40 FOR COUNTER=A TO B
      50 SUM=SUM+COUNTER
      60 NEXT
      70 PRINT"SUM OF ALL NUMBERS=";SUM
      80 END

      Delete
  90. plz help mjy star ban,nay ka program chayia plzz any one help me???

    ReplyDelete
  91. Miss ap Ny achy programs samjha dea ha apkoi problem nai ha ,,,, thanx alot

    ReplyDelete
  92. Dear visitors all the solutions of above mentioned programs are already in my blog..plz look them in Blog Archive ...thanks for appreciate my work

    ReplyDelete
  93. plz tell me what is the maximum number of elements in a 2-D array when the dimension is not mentioned?

    ReplyDelete
  94. iwant a program of if then else statement

    ReplyDelete
  95. PLEASE CORRECT the following statement
    10 CLS
    20 INPUT"ANY NAME";N
    30 PRINT N 10 TIMES
    40 END

    ReplyDelete
  96. Please tell me, How to write a program in which we calculate square and cube of 1 to 10 numbers.

    ReplyDelete
  97. PLEASE TELL ME HOW TO WRITE A PROGRAM IN WHICH WE CALCULATE MARKS OF FIVE SUBJECTS AND FIND PERCENTAGE ALSO.

    ReplyDelete
  98. plz help me i want your help it is always giving error plzzz

    ReplyDelete
  99. I want to try a program that input 50 country n display their capital as output
    ..can u gve me some example..pls..

    ReplyDelete
  100. Very helpful for beginners.

    ReplyDelete
  101. I need a program that can arrange any ten numbers in ascending order......plz help me fast I need it in about an hour... Please. ..help

    ReplyDelete
  102. you are actually doing a great job...

    ReplyDelete
  103. i need a program by using if-then-else statement with array immediately

    ReplyDelete
  104. HOW TO WRITE A PROGRAM WHICH TAKES A SERIES AND PRINT THE CODE FOR IT

    ReplyDelete
    Replies
    1. you stupid don't you know???????

      Delete
    2. Am I Bigger stupid than u????????????????????

      Delete
  105. rock star naranaranananaa28 December 2013 23:11

    hi beenish aunty

    ReplyDelete
  106. I want a program to find the largest no entered by array

    ReplyDelete
  107. hi
    please i need help on how to write a program to compute the roots of a quadratic equation. we can test the program with A=2, B= - 4 AND C=1.

    ReplyDelete
  108. Can you please help me in writing "Program to sort the list of 20 names in descending order" Your help will be appreciated..

    ReplyDelete
    Replies
    1. The answer to this question is available here:
      http://www.numerical.pk/Subjects/CS/Class10th/Arrays/18.aspx

      Also visit http://www.numerical.pk/ a great website for students

      Delete
  109. i want a program.write a program which print 4,7,12,19 and 28

    ReplyDelete
  110. i want a program
    write a program to print a table by using for next loop

    ReplyDelete
  111. i want a program
    write a program to print a table of 10 by using for next loop

    ReplyDelete
  112. I want a program (formula) that will change 10ths to 5ths with out changing the values to the left of the decimal. Example: I want to change 141.8 to 141.4.

    ReplyDelete
  113. please tell me how to print a source program and its output in the middle of the page.. is there any margin settings?

    ReplyDelete
  114. write a program to input N strings and form a new string with the first and last characters of each string

    ReplyDelete
  115. A PRORAM TO KNOW THE FACTORS OF A NUMBER

    ReplyDelete
  116. i want a program to find fictorial by using FOR---NEXT loop

    ReplyDelete
    Replies
    1. i am having for while wend ...

      Auto
      10 input"Enter the number n";n
      20 f=1 ;a=n
      30 while n=0
      40 f=f*n
      50 n=n-1
      60 wend
      70 print "factorial of";a"=";f
      80 end
      run
      output:-
      enter the number n? 5
      factorial of 5=120

      Delete
  117. i didnt get my output on screen which key to press i do for the output any 1 tell me plzzz

    ReplyDelete
  118. By Computer Practical Book Of Dr.Saifuddin ;)

    ReplyDelete
  119. plz sent me program of to check wheather the number is positive, negative, or zero

    ReplyDelete
  120. Muhammad Shahzad18 February 2014 20:37

    how to make a user defined function to calculate factorial of a given number?

    ReplyDelete
    Replies
    1. i need a programe that can arrange any 10 number in ascending order

      Delete
    2. 10 CLS
      20 INPUT "ENTER A NO.";A
      30 PRINT A
      40 A=A+1
      50 IF A<=(A+10) THEN GOTO 30
      60 END

      Delete
  121. I want to make a program,
    Which is; A program to input names and if a name starts with "Z" display a massage "end of the list" and stop the execution the output must be formatted and display as shown below;

    LIST OF NAMES

    NAMES
    A
    C
    G
    S
    D
    E
    Z "END OF THE LIST"

    ReplyDelete
  122. why are u teaching the shit to students in year 2014??? this langauge is model 1987 (30 years old technology)

    ReplyDelete
  123. Hello,

    Please, teach me how to solve this QUESTION.

    QUESTION

    Write a simple Basic Program to find the average of ten scores which are 1, 5, 10, 15, 8, 9, 2, 7, 3, 4.

    Thank you.

    ReplyDelete
    Replies
    1. 10 cls
      20 read a,b,c,d,e,f,g,h,i,j
      30 let total=a+b+c+d+e+f+g+h+i+j
      40 let avr=total/10
      50 print ;total
      60 print ;avr
      70 data 1,5,10,15,8,9,2,7,3,4
      80 end

      Delete