Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int H, M, S;
- int M1, S1;
- cin >> H;
- cin >> M;
- cin >> S;
- cin >> M1;
- cin >> S1;
- S += S1;
- if (S >= 60)
- {
- S %= 60;
- M += 1;
- }
- M += M1;
- if (M >= 60)
- {
- M %= 60;
- H += 1;
- }
- cout << H << " " << M << " " << S << " " << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement