Time Arithmetic by Hendrik

i[];main(n,z,h,m,s,H,M,S){for(;gets(i);){sscanf(i,"%d:%d:%d+%d:%d:%d",&h,&m,&s,&H,&M,&S);z=s+S;n=z/60+m+M;printf("%s=%02d:%02d:%02d\n",i,(n/60+h+H)%24,n%60,z%60);}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page