Add Time

This is a program to two time entered in format hh:mm:ss..

#include<iostream.h>
#include<conio.h>
class time
{
int h,s,m;
public : void print();
friend time calc(time,time);
time()
{
h=0;
m=0;
s=0;
}
time(int hr,int mn,int sec)
{
h=hr;
m=mn;
s=sec;
}
};
time calc(time p,time q)
{
time t;
t.s=p.s+q.s;
t.m=t.s/60;
t.s=t.s%60;
t.m=p.m+q.m+t.m;
t.h=t.m/60;
t.m=t.m%60;
t.h=p.h+q.h+t.h;
return t;
}
void time::print()
{
cout<<h<<":"<<m<<":"<<s<<"\n";
}
main()
{
time t3;
time t1(2,56,34);
time t2(3,4,56);
clrscr();
t3=calc(t1,t2);
cout<<"Time 1 = ";t1.print();
cout<<"Time 2 = ";t2.print();
cout<<"Final time = ";
t3.print();
getch();
return 0;
}