Subscribe Us

Responsive Advertisement

Advertisement

CSE EXAM-20 PART A 4(b)

CSE EXAM-20 PART A 4(b)

BY UJJAL ROY





#include<bits/stdc++.h>

using namespace std;

class integernumber

{

    int a,b,c,d;

public:

    integernumber(int x,int y,int z,int p)

    {

        a=x;

        b=y;

        c=z;

        d=p;


    }

     void show()

    {

        cout<<a<<" "<<b<<" "<<c<<" "<<d<<endl;

    }

    void operator-()

    {

        a=-a;

        b=-b;

        c=-c;

        d=-d;

    }

};

int main()

{

    integernumber in(1,2,3,4);

    in.show();

    -in;

    in.show();


    return 0;

}


Post a Comment

0 Comments