#include <iostream>
using namespace std;
class unbin
 {
    int z,a[50],b[50],c[50];
    public:
    void getdata();
    void operator++();
    void operator--();
    void operator-();
    void display(void);
 };
 void unbin::getdata()
 {
    cout<<"\n Enter a number to Read:";
    cin>>z;
    cout<<"\n Enter the values :";
    for(int i=0;i<z;i++)
    {
        cin>>a[i];
    
    }
    for(int i=0;i<z;i++)
    {
      b[i]=a[i];
    }
    for(int i=0;i<z;i++)
    {
      c[i]=a[i];
    }
 }
 void unbin::operator++()
 {
  
    for(int i=0;i<z;i++)
    {
        cin>>++a[i];
    
    }
  }
 void unbin::operator--()
 {
   
    for(int i=0;i<z;i++)
    {
        a[i]=--b[i];
        
     }
  }
 void unbin::operator-()
 {
     
    for(int i=0;i<z;i++)
    {
        a[i]=-c[i];
        
    }
 }
 void unbin::display(void)
 {
  for(int i=0;i<z;i++)
  {
  cout<<a[i];
  cout<<"\n";
      
  }
 }
 int main()
 {   
     cout<<"\n INCREMENT DECREMENT AND NEGATION ";
     cout<<"\n--------------------------------";
     unbin o;
     o.getdata();
     cout<<"\n The Numbers Are  :\n";
     o.display();
     cout<<"\n Increment value :\n";
     ++o;
     o.display();
     
     cout<<"\n Decrement value :\n";
     --o;
     o.display();
     
     cout<<"\n Negation value :\n";
     -o;
     o.display();
     return 0;
 }

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: