救命有人可以告诉我我这个该怎么改吗?
查看原帖
救命有人可以告诉我我这个该怎么改吗?
1108537
dadidu楼主2023/12/18 17:00
#include <stdio.h>
int main(void)
{
	int a,b,c,d,e,f;	0<=a&&a<24,0<=b&&b<60,0<=c&&c<24,0<=d&&d<60,0<=e&&e<24,0<=f&&f<60;
	scanf("%d%d",&a,&b);
	
	scanf("%d%d",&c,&d);
	if(d>=b){
	e=c-a;
 	f=d-b;
 	printf("%d:%d",e,f);
	}else if(d<b){
	 	e=c-a-1;
	 	f=d+60-b;
 		printf("%d:%d",e,f);
 	}
	return 0;
} 
2023/12/18 17:00
加载中...