Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2012 15:05
Show Gist options
  • Select an option

  • Save anonymous/2399342 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/2399342 to your computer and use it in GitHub Desktop.
#include<stdlib.h>
#include<stdio.h>
main()
{
int Hour,Min,rhour,rmin,fmin,time;
printf("輸入現在時間:");
scanf("%d:%d",&Hour,&Min);
printf("輸入完成工作所需時間:");
scanf("%d",&time);
fmin=time+Min;
rmin=fmin%60;
rhour=(fmin-rmin)/60;
Hour=Hour+rhour;
printf("完工時間為%d:%d",Hour,rmin);
system("pause");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment