Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int tm1, ts1;
- int tm2, ts2;
- int dm1, ds1;
- int dm2, ds2;
- cin >> tm1 >> ts1;
- cin >> tm2 >> ts2;
- cin >> dm1 >> ds1;
- cin >> dm2 >> ds2;
- int tufi = (tm1 * 60) + ts1 + (tm2 * 60) + ts2;
- int dvojce = (dm1 * 60) + ds1 + (dm2 * 60) + ds2;
- int razlika;
- if(tufi < dvojce) {
- cout << "T" << endl;
- razlika = dvojce - tufi;
- }
- else {
- cout << "D" << endl;
- razlika = tufi - dvojce;
- }
- int minuti = razlika / 60;
- int sekundi = razlika % 60;
- cout << minuti << endl;
- cout << sekundi << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement