Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int H, M, S, M1, S1;
- cin >> H >> M >> S >> M1 >> 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