Qbasic Programming Examples and Exercises - ProgrammingBasic
Qbasic Programming Examples and Exercises - ProgrammingBasic
QBASIC
In this article, we will learn about QBasic examples and exercises for class 6 and class 7
standards.
Qbasic sample example programs for beginners. In this post, we will see and learn
some QBasic programming examples and do some simple exercises to understand how
it works.
Table of Contents
Examples of some Qbasic Programming Examples and
Exercises
Write a Qbasic program to enter your name and print it.
Write a Qbasic program to enter name, country, city, and age and print them.
Write a program to find the area of a rectangle in Qbasic.
Write a program to find the area of the triangle.
Write a Qbasic program to find the area of the circle.
Write a program to find the area of the square.
Write a Qbasic program to find the volume of the box.
Write a Qbasic program to find the circumference of the circle.
Write a program to find out the Simple Interest.
Write a program to find out the simple Interest and the Amount.
Update: More Qbasic Examples
This post has beginner-level Qbasic examples and exercises that will help you to
understand the concept of variable and Qbasic statements like INPUT, PRINT, CLS, etc
Before getting started it is important to know the basic Qbasic statements or QBasic
commands first.
Here, we will code and learn some simple examples that are easy to understand for class
6/ class 7 students, who have started with QBasic programming.
Here, the program codes are explained with their formulas to help you understand them
better.
Exercises
EXAMPLE 1:
END
Here since the input data is a string then the variable name ( n ) in which it is to be stored
is written after INPUT command followed by $ sign( n$ ).
EXAMPLE 2:
END
Since the entered value of name, city, and country is a string so we write the variable
name with a $(dollar sign) before them, and since age is a number so the variable name
is written directly.
Example 3:
CLS
LET A = l*b
END
Example 4:
Here variable b is the base and h is the height. T is the variable to store the result and
print it.
CLS
LET T = 1/2*b*h
Example 5:
CLS
LET C=22/7*R^2
END
Example 6:
CLS
END
Example 7:
The variable are l, b , and h for length, breadth and height and the result will be stored in
the variable volume.
CLS
END
Example 8:
CLS
LET Circumference=22/7*R*2
Example 9:
CLS
LET I = P*T*R/100
END
Example 10:
CLS
LET I = P*T*R/100
LET A= P + I
END
So, these are some common Qbasic programming examples that are useful for students
and new programmers. These posts will be updated frequently with new Qbasic
examples and exercises, so keep visiting for more fun programming exercises.
PREVIOUS NEXT
Search
Search
Recent Posts
Categories
CSS
JavaScript
Nuxt
Python
QBasic
Quick Fix
ReactJs
Svelte
Uncategorized
Vue
About Us Blogs
Categories
Contact Us
Disclaimer