#include<iostream.h>
#include<conio.h>
class one
{
private:
                int x,y;
public:
                void get()
                                {
                                x=10;
                                y=20;
                                }
                void show() const
                                {
                                x+y;
                                cout<<"Addition = "<<_AX;
                                }
};
void main()
{
                one obj;
                clrscr();
                obj.get();
                obj.show();
                getch();
}

155.PNG

Advertisements