Add 5 to the value stored in total, and take the value and store it back in total. - C++ Operator

C++ examples for Operator:Arithmetic Operator

Description

Add 5 to the value stored in total, and take the value and store it back in total.

Demo Code

#include <iostream> 

using namespace std; 

int main() /*from  w ww  .  j a  v  a2 s .  c o  m*/
{ 
  int total; 
  total = 12; 
  cout << total << endl; 
  total = total + 5; 
  cout << total << endl; 
  return 0; 
}

Result


Related Tutorials