Sign In
Ask Question
Dawson Daniels
Computers & Technology
11 November, 21:07
Three ways to increase value of a variable
+4
Answers (
1
)
Jaylee Oneal
11 November, 21:34
0
Three ways to increase the value of variable are given below. To eleborate the answer, I am taking a variable x that need to be increase.
x=x+1 x+ + x+=1
Explanation:
There are three ways to increase the value of variable.
1. x = x+1
In this case, each time value of x (variable) is incremented and stored in that variable. This equation increase the value of x by 1 each time. For Example
if x=1
then in first iteration
x = x+1 = 2;
If we want to increase the value of x by more than 1, we can add that value with x, as x+2, x+3 and so on.
2. x++
This will increment the value of x by 1. If we use this equation multiple time in program, each time it will increase 1 in value of x.
3. x+=1
This also works same as equation 1. It will increment 1 in this form and can be changed with 2, 3 and so on.
Comment
Complaint
Link
Know the Answer?
Answer
Not Sure About the Answer?
Find an answer to your question 👍
“Three ways to increase value of a variable ...”
in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers
You Might be Interested in
What are the three principles of graphic design
Answers (1)
What is the square root of 1600 and 36?
Answers (1)
Write the function onlyTwo (x, y, z) which takes in three positive integers x, y and z. The function returns an integer with the sum of the squares of the two largest numbers.
Answers (1)
Search indexes are different from search engines because:
Answers (1)
What feature new to Windows Server 2012 provides the ability to find identical sets of data on a SAN based storage array and reduce the identical sets to a single instance, in order to reduce space
Answers (1)
New Questions in Computers & Technology
Arrange the following storage media in descending order of storage capacity:Zip disk, a standard floppy disk, a compact disc, 123, 321,132, 312
Answers (1)
Jacob wants to be a Steamfitter. He just finished his associate's degree. Which best describes what he should do next? A. Get a bachelor's degree. B. Do a three - to five-year apprenticeship. C. Get a master's degree. D.
Answers (2)
what is the difference between a packet filtering firewall and a dynamic stateful inspection firewall?
Answers (1)
What is another name for maize?
Answers (1)
Maintain a distance of at least between your vehicle and the vehicle behind you. A. 2 seconds B. 3 seconds C. 4 seconds D. 5 seconds
Answers (1)
Home
»
Computers & Technology
» Three ways to increase value of a variable
Sign In
Sign Up
Forgot Password?