QBASIC
QBASIC category contains programs written in QBASIC programming language. This is an archive page that contains the collection of programs written in that language.
About Me:
I am a web developer with expertise in web development using various web technologies.
I have always been fascinated and enthusiastic about technology ever since my childhood. I always wanted to be familiar with what, why, and how of technologies. Web development has been my only passion ever since I started learning it. Following this passion, I have always been ready to learn new technologies and implement them in my projects.
I do have expertise in coding and have a good understanding of various languages like QBASIC, C/C++, Python, Java, Ruby, etc. along with front-end technologies like HTML, CSS, JavaScript, jQuery, AJAX, React, and Vue. I also have experience in developing websites and web applications using backend technologies like PHP, Ruby on Rails in combination with the database system MySQL.
Website: https://developeranil.tech
Make sure to post the comments for each program if you have any issues. I will respond to it as soon as possible.
Below is the program to calculate the cube of the user input number. Explanation: To find the cube, we will be using the exponentiation operator (^). The operator is used to raise a number to an exponent of a designated number. Coming to the example, a ^ 3 is used which means a is raised …
QBASIC – Find the cube of a number Read More »
Below is the program to calculate the square of the user input number. Explanation: To find the square, we will be using the exponentiation operator (^). The operator is used to raise a number to an exponent of a designated number. Coming to the example, a ^ 2 is used which means a is raised …
QBASIC – Find the square of a number Read More »
As we know, QBASIC supports different types of looping structures; WHILE…WEND, FOR…NEXT and DO…LOOP WHILE. Since, WHILE…WEND and DO…LOOP WHILE has much significance, let’s understand the difference between WHILE…WEND loop and FOR…NEXT loop in QBASIC. FOR loop provides a concise way of writing the loop structure. A FOR loop contains the loop variable initialization, condition …
QBASIC – Difference between WHILE and FOR loop Read More »
Following is a basic program to print numbers from 1 to 5 using DO…LOOP WHILE loop in QBASIC. Explanation: DO…LOOP WHILE is similar to WHILE…WEND loop except for the piece of code is executed first before the condition is checked. Let’s understand the syntax and differences from WHILE…WEND loop. The loop starts with initializing the …
QBASIC DO…LOOP WHILE – Print numbers from 1 to 5 Read More »
Below is the QBASIC program to display the numbers from 1 to 5 using WHILE…WEND looping statement. The main objective of the example is to understand the syntax of WHILE…WEND loop. Explanation: Unlike FOR loop where the value of the loop variable is initialized in the looping statement, the loop variable is initialized before the …
QBASIC WHILE Loop – Print numbers from 1 to 5 Read More »
Below is a program to print numbers from 1 to 5. This is a basic example of for loop in QBASIC. The main objective is to understand what loop is and how it is used. Explanation: Let’s first understand what a loop in QBASIC is. Loop means to run a piece of code a repeated …
FOR Loop – Print from 1 to 5 Read More »
Below is a QBASIC program to find if a number entered by the user is even or odd. Explanation: First, let’s understand even and odd numbers. Even numbers are those that are divisible by 2 (2,4,6,8,10…) and the ones that are not divisible by 2 are odd numbers(1,3,5,7,9,…). Now, to determine whether a number is …
QBASIC – Determine a number is Even or Odd Read More »
The example below takes a number from a user as input and displays it. Explanation: The first line starting with a single quote(‘) is a comment which is not interpreted by the QBASIC interpreter. Comments are very useful to remember what the statements are being used for in the program or to know what the …
QBASIC – Input a number and display it Read More »
QBASIC stands for Quick Beginners’ All-Purpose Symbolic Instruction Code. QBASIC is one of the most popular high-level programming languages. Now let’s have a look at a basic example to understand some of the basic statements used in QBASIC. CLS is used to clear the output screen. PRINT is used to display output messages to the …
Understanding QBASIC Read More »