Qbasic Program

0314

Qbasic Program Average ratng: 3,5/5 1110reviews

1)Write a program to enter your name and print it. CLS Input 'Enter you name';n$ Print 'The name is';n$ End 2)Write a program to enter your name, city, country, age and print them. CLS Input ' Enter the name ';N$ Input ' Enter the city';C$ Input ' Enter the country';CO$ Input ' Enter the age';A Print ' The name is ';N$ Print ' The city is ';C$ Print ' The country is ';CO$ Print ' The age is ';A End 3)Write a program to find the area of rectangle. Cls Input ' enter the length ';l Input ' enter the breadth ';b let A = l*b Print' the area of rectangle=';a End 4)Write a program to find the area of the triangle. Cls Input ' enter the base';b Input ' enter the height';h let T = 1/2*b*h Print' The area of triangle=';T End 5)Write a program to find the area of the circle. Cls Input' Enter the radius ';R Let C=22/7*R^2 Print ' The area of circle =';C End 6)Write a program to find the circumference of the circle.

Nigerian Gospel Songs there. Cls Input' Enter the radius ';R Let Circumference=22/7*R*2 Print ' The area of circle =';Circumference End 7)Write a program to find the area of the square. Cls Input' Enter the number';n Let square= n^2 Print' The area of square=';Square End 8)Write a program to find the area of the square and cube.

Copy the example programs into QBasic, run them, modify them, and play with them. Details on how to do this are in the lessons. With the guidance of these notes. Later packages, such as Learn to Program BASIC would also have gaming as an introductory focus. Inspired by QBasic, and the Visual Basic-styled RapidQ.

Cls Input' Enter the number';n Let square= n^2 Let Cube = n^3 Print' The area of square=';Square Print' The area of cube='; Cube End 9)Write a program to find the volume of the box. Cls Input ' enter the length ';l Input ' enter the breadth ';b Input ' enter the height ';h Let Volume= l*b*h Print' The volume of box =';Volume End 10)Write a program to convert the weight from kilogram to pounds. CLS Input'Enter the weight in kilogram';K Let P=K*2.2 Print 'The pound is ';P End 11)Write a program to convert the distance from kilometer to miles. Cls Input'Enter the length in kilometer';K Let M= K / 1.6 Print 'The length in miles =';M End 12)Write a program to convert the distance from miles to kilomiles.

Cls Input ' Enter the length in miles';M Let K=M*1.6 Print' The length in kilo miles=';K End 13)Write a program to enter the initial mileage(m1) and final mileage (m2) then calculate the distance traveled. CLS Input 'Enter the Initial Mileage';M1 Input 'Enter the Final Mileage';M2 Let D= M2-M1 Print ' The distance covered=';D End 14)Write a program to find out the simple Interest. Cls Input ' Enter the Principal';P Input ' Enter the Rate';R Input ' Enter the Time';T Let I = P*T*R/100 Print ' The simple Interest = ';I End 15)Write a program to find out the simple Interest and the Amount.

Cls Input ' Enter the Principal';P Input ' Enter the Rate';R Input ' Enter the Time';T Let I = P*T*R/100 Let A= P + I Print ' The simple Interest = ';I Print ' The amount=';A End 16)Write any number and find it's half. Cls Input 'Enter the desired number '; N Let H = N/2 Print 'The half of the number = ';H END 17)Write a program to find the area of four walls of a room. Cls Input'Enter the height ';H Input'Enter the length '; L Input'Enter the Breadth';B Let A= 2 * H * (L+B) Print ' The area of four walls =';A End 18)Write a program to find the perimeter of a rectangle. Cls Input ' enter the length ';l Input ' enter the breadth ';b Let P=2*(l+b) Print' The perimeter of rectangle=';P End 19)Write a program to enter any three numbers,sum and the average. Cls Input ' Enter any number';A Input ' Enter any number';B Input ' Enter any number';C Let Sum = A+B+C Let Average =Sum/3 Print' The sum=';Sum Print' The Average is ';Average End 20)Write a program to enter any two numbers their Sum,Product and the Difference. CLS Input ' Enter any number';A Input ' Enter any number';B Let Sum = A+B Let Difference= A-B Let Product = A*B Print' the sum =';Sum Print' the Difference =';Difference Print' the Product ='; Product End 21)Write a program to find the average of three different numbers.

Qbasic Program
This entry was posted on 3/14/2018.