#include<iostream.h>
#include<conio.h>
class sample
{
int n1,n2;
public:
sample()
{
n1=10;
n2=20;
}
sample(int a,int b)
{
n1=a;
n2=b;
}
sample(int a,long int b=50)
{
n1=a;
n2=b;
}
void show()
{
if(n1>n2)
cout<<"\n Maximum = "<
else
cout<<"\n Maximum = "<
}
};
void main()
{
clrscr();
cout<<"\n for Default constructor : ";
sample s;
s.show();
cout<<"\n For parameterizd constructor : ";
sample s1(40,30);
s1.show();
cout<<"\n For Default constructor : ";
sample s2(60);
s2.show();
getch();
}
/* OUTPUT
for Default constructor :
Maximum = 20
For parameterizd constructor :
Maximum = 40
For Default constructor :
Maximum = 60
*/