+1 vote
by (1.1k points)
formulas for increment and decrement

1 Answer

0 votes
by (1.6k points)
selected by
 
Best answer

1) Use increment (++) and decrement (-) operator. Example When x=4, x++ returns 5 and x- returns 3. 

2) Use conventional + or – sign. Example When x=4, use x+1 to get 5 and x-1 to get 3.

Welcome to CodersEditor Q&A, where you can ask questions and receive answers from other members of the community.
...