Sper ca la asta te-ai referit:
#include <iostream>
using namespace std;
int main()
{
int h1, m1, s1, h2, m2, s2, hFinal = 0, mFinal = 0, sFinal = 0;
cin >> h1 >> m1 >> s1 >> h2 >> m2 >> s2;
sFinal = (s1+s2)%60;
mFinal = (s1+s2)/60;
mFinal += m1+m2;
hFinal += mFinal / 60;
mFinal = mFinal%60;
hFinal += h1 + h2;
cout << hFinal << " " << mFinal << " " << sFinal;
return 0;
}