Skip to content

Instantly share code, notes, and snippets.

@Fatima-progmmer
Created February 4, 2025 11:03
Show Gist options
  • Save Fatima-progmmer/7eb5f4422eb36dc4a51f414034cce5fb to your computer and use it in GitHub Desktop.
Save Fatima-progmmer/7eb5f4422eb36dc4a51f414034cce5fb to your computer and use it in GitHub Desktop.
This program show the how user operator with any variables 1- postfix increment 2- prefix increment 3- postfix decrement 4- prefix decrement
#include <iostream>
using namespace std;
int main()
{
int num;
cout << " Enter a number =";
cin >> num;
cout << ++num << endl;
cout << --num << endl;
cout << num++ << endl;
cout << num-- << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment