Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a,b,c,d;
- while(scanf("%d %d", &a, &b)!= EOF){
- c=a/30;
- d=b/6;
- if(c>=0 && c<=9 && d>=0 && d<=9){
- printf("0%d:0%d\n",c,d);
- }
- else
- if(c>9 && d>=0 && d<=9){
- printf("%d:0%d\n",c,d);
- }
- else
- if(c>=0 && c<=9 && d>9){
- printf("0%d:%d",c,d);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement