Arithmetic in c++ is quite straightforward. All of the numeric data types can be used to perform calculations. The C++ language provides the following arithmetic operators:
Operator 
Meaning 
Example 
+ 
addition 

+ 
positive 

 
subtraction 

 
Negative (inversion) 

* 
multiplication 

/ 
division 

% 
remainder 


The % operator divides its first operand by the second (like the division operator) but instead of returning the result, it returns the remainder. So 35 % 10 is 5. 




++ 
increment 

 
decrement 


There are two variants of each of these operators: a preincrement such as ++x, and a post increment such as x++. The difference is that the pre increment increments the value of its operand and then returns a value, where as the post increment returns the value of its operand, then increments the operand.





+= 
Self addition 

= 
Self subtraction 

*= 
Self multiplication 

/= 
Self division 

%= 
Self remainder 


Where applicable, the above operators should be used in preference to the longhand version (i.e. use x+=y rather than x=x+y),as the self referencing version of the operation is likely to be implemented more efficiently than the equivalent longhand version 
The operators (such as <, > and ==) used in If statements are known as conditional operators. There are six such operators in C++.
Operator 
Meaning 
Example 

> 
Greater than 


>= 
Greater than or equal 


== 
Is equal to 


<= 
Less than or equal 


< 
Less than 


!= 
Not equal 


&& 
And 


 
Or 



The terms in a compound  or && statement are always checked from left to right, so if the left most term invalidates (for &&) or proves (for ) the condition, no further conditions are checked


! 
Not 
