Menu

Custom Search

C++ lab Program

#include
#include
class time
{
int hr,min,sec;

public:
time()
{
hr=0;
min=0;
sec=0;
cout<<"Default constructor:"<=60)
{ min++;
sec-=60;

}
if(min>=60)
{ hr++;
min-=60;

}

}

void main()
{
clrscr();
time t1(1,20,30),t2(4,50,60),t3;


t3.add(t1,t2);
t1.display();
t2.display();
t3.display();

getch();
}

No comments:

Post a Comment