#include<iostream.h>
#include<conio.h>
class time
{
private:
int h,m;
public:
void readt();
void addt(time,time);
void showt();
};
void time::readt()
{
cout<<"\nEnter Time in Hours and Minutes : ";
cin>>h>>m;
}
void time::addt(time u1 ,time u2)
{
int min=u1.m+u2.m;
int hrs=min/60;
m=min%60;
h=hrs+u1.h+u2.h;
}
void time::showt()
{
cout<<"\nTime obtained on adding = ";
cout<<h<<":"<<m;
}
void main()
{
clrscr();
time ob1 ,ob2,ob3;
ob1.readt();
ob2.readt();
ob3.addt(ob1,ob2);
ob3.showt();
getch();
}