Unit#1 Basic Elements of a C++ Program | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Note that there is nothing here saying that c is equal to the sum of a and b. That is why we call this operator assignment operator. Later on we will see that there is an equality operator which is shown as = = ( two equal signs next to each other). C++ programmers use some additional assignment operators for brevity. You don't have to use these additional operators, but you must be aware of their existence and meaning. They are summarized in the table below:
a += (45.36 + b / 3.5 ) which translates to a = a + 45.36 + b / 3.5 For a discussion of the various arithmetic operations and the precedence of their execution check your book and also the next subtopic of Unit 1. |
||||||||||||||||||||||