Define a Structure time and add and subtract two times

   #include 
   #include 


   void main()
	{
	clrscr();
	struct time1
	{int hour1,min1,sec1; };
	struct time2
	{ int hour2,min2,sec2; };

	struct time1 t1;
	struct time2 t2;

	int x,y;

	cout<<"\n\tEnter time 1"<>t1.hour1;
	cout<<"\n\tEnter min1 : ";
	cin>>t1.min1;

	cout<<"\n\tEnter time 2"<>t2.hour2;
	cout<<"\n\tEnter min2 : " ;
	cin>>t2.min2;

	x=t1.hour1+t2.hour2;
	y=t1.min1+t2.min2;

	if(y>=60)
		{
		x=x+y/60;
		y=y%60;
		}

	cout << "\t" << t1.hour1 << ":" << t1.min1 << "\n";
	cout << "\t" << t2.hour2 << ":" << t2.min2 << "\n";
	cout << "\t****\n";
	cout << "\t" << x << ":" << y << endl;

	getch();
	}


    Source: geocities.com/cplusplussurvivalkit