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.

Rakshya bandhan

Raksha Bandhan is observed on the last day of the  Hindu lunar calendar  month of  Shraavana , which typically falls in August. [23]  On this day, sisters of all ages tie a cotton bracelet or amulet, called the  rakhi , [3]  around the wrists of their brothers, ritually affirming the bond and support of her brothers, receiving a gift from them in return, and traditionally investing the brothers with a share of the responsibility of their potential care. [24]  The expression "Raksha Bandhan,"  Sanskrit , literally, "the bond of protection, obligation, or care," is now principally applied to this ritual. It has also applied to a similar ritual in which a domestic priest ties string bracelets on the wrists of his patrons and receives gifts of money. [16] [25]  A ritual associated with Saluno includes the sisters placing shoots of barley behind the ears of their brothers. [13] Of special significance to married women, Raksha Bandhan is rooted ...

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 i...