answersLogoWhite

0

Yes, IF the variable has been declared, has a value, and is of a numerical type such that your addition operator can perform the operation on the number and the value of that type variable. The compiler or interpreter will look up the variable's value, substitute it for the variable, and perform the addition just as if your statement used two numbers. First example: If your number is an integer and your variable is of type real, almost any addition operator can successfully add the two. Second example: If your number is a real and your variable is a character type (with a value, say, of "Smith"), the addition will obviously fail. In many languages, however, variables of type Boolean may be handled arithmetically, as the value True equals 1 and False is zero.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Why can you multiply a number with a variable but you can't add them?

You can add them.


Can you add or subtract a number with a variable and a number without one?

Yes, you can add or subtract a number with a variable and a number without one, but they cannot be combined into a single term. For example, you can simplify the expression (3x + 5) to show that it consists of a variable term (3x) and a constant term (5), but they remain separate. The result is (3x + 5), not a single term.


How do you transform a negatively-skewed variable?

Add 1 to the largest value and then add that number to all results to obtain the new distribution


What is the answer to -5 plus a equals 21?

26, in that situation just add the negative number to the answer to find the variable


How do you find the sample mean?

Add the values of the variable for all elements in the sample and divide by the number of elements on the sample.


What is a variable minus a number and variable?

a variable minus a number and the same variable is b-6b= -5b


What number is the coefficient number?

the number next to a variable that multiplies the variable


What you add to an experiment to make a change?

You add an independent variable to an experiment to make a change. This variable is manipulated by the researcher to see if it has an effect on the outcome of the experiment.


What is the independent variable of a variable?

Just the number, for example: 7x the variable is 7. The variable is the number without the variable(x,y,z, etc.)


What is a number that has no variable attached to it?

We call a number that has no variable attached to it, a constant. A number attached to a variable, as in 3x, is called a coefficient.


What is a number a variable?

the coefficient of the variable


What is a variable replaced by a given number?

Yes since a number and a variable and a number are a symbol.