Skip to main content

Qbasic Programs

1. WAP to find the area of rectangle.
CLS
INPUT "ENTER LENGTH" ; L
INPUT "ENTER BREADTH" ; B
AREA = L * B
PRINT "AREA OF RECTANGLE IS =" ; AREA
END

2.WAP to display the area of circle.
CLS
INPUT "ENTER RADIUS" ; R
A = 22/7 * R ^ 2
PRINT "AREA IF CIRCLE" ; A
END

3. WAP to find the area of square.
CLS
INPUT "ENTER LENGTH"; L
A = L ^ 2
PRINT "AREA OF SQUARE =" ; A
END

4. WAP to find the area of triangle.
CLS
INPUT "ENTER BASE" ; B
INPUT "ENTER HEIGHT"; H
A = 1/2 * B * H
PRINT "AREA OF TRIANGLE=";  A
END

5. WAP to find the volume of cylinder.
CLS
INPUT "ENTER RADIUS" ; R
INPUT "ENTER HEIGHT" ; H
V = 22/7 * R ^ 2 * H
PRINT "VOLUME OF CYLINDER=" ; V
END

6. WAP to input percentage and display pass or fail.
CLS
INPUT "ENTER PERCENTAGE"; P
IF P > = 40 THEN
PRINT "PASS"
ELSE
PRINT "FAIL"
END IF
END

7. WAP to input any number and check odd or even.
CLS
INPUT "ENTER ANY NUMBER" ; N
IF N MOD 2 = 0  THEN
PRINT "EVEN NUMBER"
ELSE
PRINT "ODD NUMBER"
END IF
END

8. WAP to input any number and check positive, negative or zero.
CLS
INPUT "ENTER ANY NUMBER" ; N
IF N > 0 THEN
PRINT "POSITIVE NUMBER"
ELSEIF N < 0 THEN
PRINT " NEGATIVE NUMBER"
ELSE
PRINT "ZERO"
END IF
END

9. WAP to input any number and check whether it is divisible by 5 or not.
CLS
INPUT "ENTER ANY NUMBER" ; N
IF N MOD 5 = 0 THEN
PRINT "THE NUMBER IS DIVISIBLE  BY 5"
ELSE
PRINT "THE NUMBER IS NOT DIVISIBLE BY 5"
END IF
END

10. WAP to display 5,10,15,....,50.
CLS
FOR I = 5 to 50 STEP 5
PRINT I
NEXT I
END

11. WAP to display 100,90,80,....,10.
CLS
I = 100
WHILE I > = 10
PRINT I
I = I - 10
WEND
END

12. WAP to display 2,4,6,8,....,20.
CLS
I = 2
DO WHILE I < = 20
PRINT I
I = I + 2
LOOP
END

13. WAP to display 50,45,40,...,5.
CLS
I = 50
WHILE I > = 5
PRINT I
I = I - 5
WEND
END

Comments

Popular posts from this blog

adhiko manoram nritya

The  act was shown to class 8,9 and 10 .   We reached the dramas in at 1:20pm .      It was wonderful show.I think it was a very nicely presented youth act. According to us, it was shown to aware  to the student  not to Love in under age  and not to do what you want our small mistake make our life very difficult . We saw this act at Gaushala .  it was a very interesting experience to be there. we saw the act of a life time which taught so much.

Fathers day(Kuse ausi)

Father, mother and teacher are given the place of God in Hindu religion. Father, Pita or Babu is guru, rakshak and the palankarta. That means father is teacher, protector and the savior. Father's day is the day of paying respect once again to him.  Father’s Day is also known as Kuse Ausi or Pitri Tirpani Aausi or Gokarne Ausi. This day Nepali people pay their homage to their father with their favorite food, clothing and other dad’s favorite stuff.  Mukh Herne means "to allow someone as our relative or give respect or to recognize the achievement of someone".  This is a special day, we recognize and pay respect to our father for his care and love to us (his children and family) during his life. Hence,  this day is called "Babu ko Mukh herne din” . The literal meaning of Mukh Herne is to see someone's face.  Kuse ausi is on Bhadra Krishna Ausi. Ausi is no-moon day.  This year father's day in Nepal  is on Bhadra 27, 2072, which is on Sept 13, 201

Experience Of dhading

We (students of grade 8) went to tour to Dhading on 2076/08/28. Our tour was of 2 days and 1 night (28-29). So, on 28 of Mangsir, we started our journey from our  school from 11:30 am. We enjoyed a lot in the bus; singing, dancing & enjoying the scenery with friends and teachers . At the middle of our journey, we also had our lunch. Then, we reached to our destination (Dhading) at 3:30 pm. We were really happy after reaching there. We went inside the resort- Camp Spring Wood and got got some instructions & got fresh there. There was the rule of self-service .We again had our lunch. Then, we all went to the jhurlunge pul which was near to that resort. We enjoyed there and returned back and went to the bank of Trishuli River & played a lot there. After going back to the resort, we went inside our tent. Then, we played some music and danced a lot with our friends. We got tired after dancing and had our dinner. Then we did camp-fire, singing and dancing around along