#include
using namespace std;
int main() {
int h1,min1,h2,min2,h,min,m;
cin >> h1 >> min1;
cin >> h2 >> min2;
m = (h2*60+min2)-(h1*60+min1);
h = m / 60;
min = m % 60;
cout << "h = " << h << " min = " << min;<br> return 0;
}
Пример:
1 55
3 15
h = 1 min = 20