Created
April 16, 2012 15:05
-
-
Save anonymous/2399342 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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