#include<iostream.h>

#include<conio.h>

class data

{

private:

int day, month, year;

public:

void init(int x, int y, int z)

{

day=x;

month=y;

year=z;

}

void display()

{

cout<<day<<“-“<<month<<“-“<<year<<endl;

}

};

void main()

{

clrscr();

date d1, d2, d3;

d1.init(30,12,1995);

d2.init(23,11,2001);

d3.init(17,02,1992);

cout<<“Date of Birth of first person:”;

d1.display();

cout<<“Date of Birth of second person:”;

d2.display();

cout<<“Date of Birth of third person:”;

d3.display();

getch();

}

Advertisements