Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int Race()
- {
- int h,m,s;
- int a,b,c;
- int winT,T;
- if(scanf("%d:%d:%d",&h,&m,&s)==3){
- printf("First time is: %d:%d:%d\n",h,m,s);
- }
- while(scanf("%d:%d:%d",&a,&b,&c)==3)
- {
- printf("Second time is: %d:%d:%d\n",a,b,c);
- printf("Winning time is: %d:%d:%d\n",h,m,s );
- winT=h*3600+m*60+s;
- T=a*3600+b*60+c;
- T=T-winT;
- printf("+%d:%02d:%02d",T/3600,(T%3600)/60,T%60);
- }
- }
- int main()
- {
- Race();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement