C++ examples for Operator:Arithmetic Operator
Test arithmetic assignment and decrement
#include <iostream> using namespace std; int main()//from ww w. j a v a 2 s . c o m { int var = 10; cout << var << endl; // var is 10 var *= 2; // var becomes 20 cout << var-- << endl; // displays var, then decrements it cout << var << endl; // var is 19 return 0; }