Sequential Programs in QBASIC
Rajkumar Lama
February 14, 2019
learn qbasic
,
qbasic code
,
qbasic for class 8
,
qbasic programming tutorials
,
qbasic programs
,
sequential programs in qbasic
,
technical school
1) WAP to display "Hello World" on the screen
2) WAP to display your name address and school name.
3) WAP display the sum of 20, 30 and 10.
4) Write a program to get 2 numbers from the user and display the sum.
5) WAP to enter length and breadth of room and print the area of room. [Hints: A=(l*b)]
6) WAP to enter length and breadth of room and display the perimeter of room. [Hints: P=2(l+b)]
7) WAP to enter radius of a circle; then calculate and display its area. [Hints: A=πr2]
8) WAP to input temperature in Celsius and calculate its temperature in Fahrenheit. [Hints: F=9/5*c+32]
9) WAP to input temperature in Fharenheit and calculate its temperature in Celsius. [Hints: C=(F-32)*5/9]
10) WAP to enter Principal (P), Time (T) and Rate (R) and display simple interest. [Hints: I=PTR/100]
11) WAP to enter length, breadth and height and print volume. [Hints: v = l*b*h]
12) WAP to enter distance into K.M and convert it into M. [Hints: 1km = 1000m]
Face Book Page : https://www.facebook.com/technicalschoolnepal
CLS PRINT "Hello World!" END
2) WAP to display your name address and school name.
CLS CLS PRINT "Your name" PRINT "Your Address" PRINT "Your school name" END
3) WAP display the sum of 20, 30 and 10.
CLS CLS a = 20 b = 30 c = 10 add = a + b + c PRINT "The sum = "; add END
4) Write a program to get 2 numbers from the user and display the sum.
CLS CLS INPUT "Enter first number "; x INPUT "Enter second number "; y add = x + y PRINT "The sum = "; add END
5) WAP to enter length and breadth of room and print the area of room. [Hints: A=(l*b)]
CLS CLS INPUT "Enter length of room "; l INPUT "Enter breadth of room"; b a = l * b PRINT "Area of room = "; a END
6) WAP to enter length and breadth of room and display the perimeter of room. [Hints: P=2(l+b)]
CLS INPUT "Enter length of room "; l INPUT "Enter breadth of room"; b p = 2 * (l + b) PRINT "Area of room = "; p END
7) WAP to enter radius of a circle; then calculate and display its area. [Hints: A=πr2]
CLS CLS INPUT "Enter the radius of circle "; r a = (22 / 7) * r ^ 2 PRINT "Area of Circle = "; a END
8) WAP to input temperature in Celsius and calculate its temperature in Fahrenheit. [Hints: F=9/5*c+32]
CLS INPUT "Enter temperature in Celsius "; c f = 9 / 5 * c + 32 PRINT "Temperature in Fahrenheit = "; f END
9) WAP to input temperature in Fharenheit and calculate its temperature in Celsius. [Hints: C=(F-32)*5/9]
CLS INPUT "Enter temperature in Fahrenheit "; f c = (f - 32) * 5 / 9 PRINT "Temperature in Celsius = "; c END
10) WAP to enter Principal (P), Time (T) and Rate (R) and display simple interest. [Hints: I=PTR/100]
CLS INPUT "Enter P "; p INPUT "Enter T "; t INPUT "Enter R "; r i = p * t * r / 100 PRINT "Simple Interest = "; i END
11) WAP to enter length, breadth and height and print volume. [Hints: v = l*b*h]
CLS INPUT "Enter Length "; l INPUT "Enter Breadth "; b INPUT "Enter Height "; h v = l * b * h PRINT "Volume = "; v END
12) WAP to enter distance into K.M and convert it into M. [Hints: 1km = 1000m]
CLS INPUT "Enter distance in K.M "; km m = km * 1000 PRINT km; " K.M = "; m; "M" END13) WAP to input name of item, price of item and quantity then calculate the amount [Amount = price * quantity]
CLS INPUT "Enter the name of Item "; iname$ INPUT "Enter Price Per Unit "; p INPUT "Enter Quantity "; q a = p * q PRINT "Total Amount = "; a END14) WAP that ask you to input a number; then calculate the square and square root of that number.
CLS INPUT "Enter a Number "; n PRINT "Square = "; n ^ 2 PRINT "Square Root = "; SQR(n) END15) WAP to calculate the area of triangle. [Hints: A=1/2(b*h)]
CLS INPUT "Enter Breadth "; b INPUT "Enter Height "; h a = 1 / 2 * (b * h) PRINT "Area of Triangle = "; a END16) WAP to calculate the area of triangle. [Hints: A=1/2(b*h)]
CLS INPUT "Enter Breadth "; b INPUT "Enter Height "; h a = 1 / 2 * (b * h) PRINT "Area of Triangle = "; a END17) WAP to calculate the area of 4 walls. [Hints: A = 2H(L + B)
CLS INPUT "Enter Length "; l INPUT "Enter Breadth "; b INPUT "Enter Height "; h a = 2 * h * (l + b) PRINT "Area of 4 wall = "; a END17) WAP to print the area of triangle when 3 sides are given.
CLS INPUT "Length of First Side "; a INPUT "Length of Second Side "; b INPUT "Length of Third Side "; c S = (a + b + c) / 2 ar = (S * (S - a) * (S - b) * (S - c)) ^ 1 / 2 PRINT "Area of Triangle = "; ar END18) WAP to enter time in second and convert into hour minute and second.
CLS INPUT "Enter time in second "; s h = s \ 3600 s = s MOD 3600 m = s \ 60 s = s MOD 60 PRINT "Hour = "; h PRINT "Minute = "; m PRINT "Second ="; s ENDVisit YouTube Channel : https://www.youtube.com/technicalschoolnepal
Face Book Page : https://www.facebook.com/technicalschoolnepal