Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main ()
- {
- int a, a1, b, b1, x, y, z = 0;
- scanf("%d %d %d %d", &a, &a1, &b, &b1);
- if(b > a) x = b - a;
- else if(a == b) x = 24;
- else x = (24 - a) + b;
- if(b1 > a1) y = b1 - a1;
- else if(a1 == b1) y = 0;
- else {
- y = 60 - (a1 - b1);
- x--;
- }
- printf("O JOGO DUROU %d HORA(S) E %d MINUTO(S)\n", x, y);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement