answersLogoWhite

0

What is a variable in QBASIC?

Updated: 4/28/2022
User Avatar

Wiki User

12y ago

Best Answer

Variables in Qbasic are divided into two groups. There are numerical variables

and string variables.

This is how you would use a numerical variable:

CLS

INPUT "Enter your first number"; num1

INPUT "Enter your second number"; num2

num3 = num1 * num2

CLS

PRINT "The product of the two numbers is"; num3

END

This example just has the user input 2 variables (num1 and num2)

and store them as numerical variables. Num3 is defined by multiplying

the two user-imputed variables. The text displayed with PRINT

contains normal text with a semi colon to display the result.

This is a string variable example:

CLS

INPUT "What is my name?"; name$

PRINT "Hi I'm"; name$

END

Instead of inputting just the variable name, you add a dollar sign

to signify that it's a string variable. String variables contain letters rather

than numbers. For string variables, you simply put the $ after the variable name every time it's used. Other than that, it's much like a numerical variable.

That's a basic outline of how the variables work. Manipulating the string variables is a different story.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Anonymous

Lvl 1
3y ago

A variable is a location in the memory , which has been assigned a name and it used to store data temporaily . It holds the value until another value is assigned to it .

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a variable in QBASIC?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Statistics

What is the explanation for the two modes of QBASIC?

(1) Immediate mode In this mode, QBASIC performs the command/instruction that we type in immediately after we press the enter key. (2) Program mode In this mode, the instructions/commands we type in are not performed as we type them in, but are first stored in the computer memory as a program. This program can be executed later, at a high speed.


Difference between numeric constants and numeric variables in qbasic?

A constant is not supposed to change during program execution. A variable may change, in the sense that you assign a value, then another value, then another...A constant is not supposed to change during program execution. A variable may change, in the sense that you assign a value, then another value, then another...A constant is not supposed to change during program execution. A variable may change, in the sense that you assign a value, then another value, then another...A constant is not supposed to change during program execution. A variable may change, in the sense that you assign a value, then another value, then another...


Is the gender of college students a discrete random variable a continuous random variable or not a random variable?

It is a discrete random variable.


What does variable held constant mean?

The distinction between these two types of variables is whether the variable regress on another variable or not. Like in a linear regression the dependent variable (DV) regresses on the independent variable (IV), meaning that the DV is being predicted by the IV. Within SEM modelling this means that the exogenous variable is the variable that another variable regresses on. Exogenous variables can be recognized in a graphical version of the model, as the variables sending out arrowheads, denoting which variable it is predicting. A variable that regresses on a variable is always an endogenous variable even if this same variable is used as an variable to be regressed on.


What is the the variable you change to see how it will affect the dependent variable?

independent variable

Related questions

What is the input of a variable called in qbasic?

Variables don't have inputs. A variable is a named memory location where a value may be read or written. You write a variable by assigning a value to it. The value may be obtained from user-input.


What extension would a file saved in Qbasic have?

the extensions of qbasic are that, there are only 80 pixels to write in the qbasic


Why are rem statements important in qbasic programming?

qbasic is important because its technology


What is the shortcut key for input statement in QBasic?

There is no shortcut key of input in qbasic


What are the different types of operators in QBASIC?

The different types of operators in QBASIC are:Arithmetic OperatorsRelational OperatorsLogical Operators


What are the difference between gwbasic and qbasic?

Difference between QBASIC and GWBASIC?


Why is QBasic called QuickBasic?

Qbasic and Quickbasic are not the same! Qbasic was a free interpreter that Microsoft included with MS-DOS. Although Quickbasic uses similar syntax as quickbasic it allows programs to be compiled.


Who found QBASIC?

microsoft


Do you need statement numbers in QBASIC?

Statement numbers were a feature of BASIC, and while QBASIC supports them, they are by no means necessary.


Advantage of qbasic?

The advantage of qbasic is that it is easy to learn, to start out,then one can move on to more complex, or advanced languages.


What are the 2 types of data allowed in QBASIC?

the two types of data used in Qbasic is numeric data and alpha numeric data.


What is the default screen mode of Qbasic?

The default screen mode for Qbasic is 0.