C++ examples for Operator:Arithmetic Operator
Displays the values of three variables before and after they are used in a complex multiple-expression statement.
#include <iostream> int main() //from w w w . j a v a 2s . c om { int x = 2, y = 4, z = 8; std::cout << "Before -- x: " << x << " y: " << y; std::cout << " z: " << z << "\n\n"; z = x = y + 13; std::cout << "After -- x: " << x << " y: " << y; std::cout << " z: " << z << "\n"; return 0; }