#include <iostream.h>
#include <conio.h>
class addition
{
int data;
public:
addition() //constructor
{data=0;}
void getdata(addition o1)
{cout<<"\nEnter Your Data :-";
int sum;
cin>>sum;
data=data+sum;
}
void display(void)
{ cout<<"\nSum of Data is :-"<<data;}
};
void main()
{
#include <conio.h>
class addition
{
int data;
public:
addition() //constructor
{data=0;}
void getdata(addition o1)
{cout<<"\nEnter Your Data :-";
int sum;
cin>>sum;
data=data+sum;
}
void display(void)
{ cout<<"\nSum of Data is :-"<<data;}
};
void main()
{
0 comments:
Post a Comment