Pages

Wednesday, 21 February 2018

Example of Auto-increment and Auto-decrement Operators in C++ Programming Language

Example of Auto-increment and Auto-decrement Operators in C++ Programming Language

#include <iostream>
using namespace std;
int main(){
  int num1 = 240;
  int num2 = 40;
  num1++; num2--;
  cout<<"num1++ is: "<<num1<<endl;
  cout<<"num2-- is: "<<num2;
  return 0;
}