Professional Documents
Culture Documents
Operation Statements
• Arithmetic Operation
5.1 and C Operators
• Trigonometry
5.2 Functions
voltage/=sqrt(2); voltage=voltage/sqrt(2);
i-- i=i – 1
i++ i=i + 1
(i is incremented AFTER I has been used)
++i i incremented before i is used
Value of x : 4
Value of x + + : 4
New value of x : 5
Value of x - - : 5
?
New value of x : ?
4
Value of + + x : ?
5
New value of x : ?
5
Value of - - x : ?
4
New value of x : ?
4
Example :
Operator Meaning
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
== Equal
!= Not equal
1 + 2 * 3 - 4 / 5 =
1 + (2 * 3) - (4 / 5)
b2-4ac b*b-4*a*c
a+b (a+b)/(c+d)
c+d
a=πr2 a=PI*r*r