#include<iostream.h>
#include<conio.h>
class time
{
private:
int hours;
int minitus;
int seconds;
public:
time()
{
hours=0; minitus=0; seconds=0;
}
time(int hh, int mm , int ss)
{
hours=hh; minitus=mm; seconds=ss;
}
void showtime()
{
cout<<hours<<":"<<minitus<<":"<<seconds;
}
void gettime()
{
cout<<"\n Enter the hours :"; cin>>hours;
cout<<"\n Enter the minites :"; cin>>minitus;
cout<<"\n Enter the seconds :"; cin>>seconds;
}
void addtime(time,time,time);
};
void time::addtime(time t2,time t3,time t4)
{
hours=t2.hours+t3.hours+t4.hours;
minitus=t2.minitus+t3.minitus+t4.minitus;
seconds=t2.seconds+t3.seconds+t4.seconds;
}
void main()
{
time ti1,ti3,ti4;
time ti2(07,50,33);
ti1.gettime();
ti4.addtime(ti1,ti2,ti3);
cout<<endl;
cout<<"----------------------------------------------------------------------";
cout<<endl;
cout<<" The time no one is (hh:mm:ss) : ";ti1.showtime();cout<<endl<<endl;
cout<<" The time no two is (hh:mm:ss) : ";ti2.showtime();cout<<endl<<endl;
cout<<" The time no three is (hh:mm:ss) : ";ti3.showtime();cout<<endl<<endl;
cout<<" The time no four is **sumation** (hh:mm:ss) : ";ti4.showtime();cout<<endl<<endl;
getche();
}