# include <iostream.h>
# include <conio.h>
# include <stdlib.h>
class date
{
int dd,mm,yy;
public:
date()
{
}
date(int cdd,int cmm,int cyy)
{
dd=cdd;
mm=cmm;
yy=cyy;
}
operatorchar *();
};
main()
{
clrscr();
date d1,d2;
int cmm,cdd,cyy;
cout<<"\nENTER THE DAY:->";
cin>>cmm;
cout<<"\nENTER THE MONTH:->";
cin>>cdd;
cout<<"\nENTER THE YEAR:->";
cin>>cyy;
char dt[10];
d2.date(cdd,cmm,cyy);
strcpy(dt,d2);
}
date::operatorchar *()
{
char *str;
char a[10];
str=a;
int i=1;
while(1)
{
*str=dd/10+'0';
str++;
*str=dd%10+'0';
str++;
i++;
if(i>3)
break;
*str='/';
str++;
if(i==2)
dd=mm;
else
dd=yy;
}
}