Menu

Custom Search

C++ lab Program

#include
#include
class data
{
int x,y;
public: data():x(0),y(0){cout<<"Default constructor"< data( int a,int b):x(a),y(b){ cout<<"Parameterised constructor"< void display()
{ cout<<"X="< cout<<"The product of two no is:"<< x*y< }
};
void main()
{
clrscr();
data d,d1(5,4);
d.display();
d1.display();
getch();
}

No comments:

Post a Comment