Time Arithmetic by leonid

main(a,s,b,c,d,e,f){for(;gets(s);printf("%s=%02d:%02d:%02d\n",s,(a+d+b/59)%24,(b+c/60)%60,c%60))sscanf(s,"%d:%d:%d%d:%d:%d",&a,&b,&c,&d,&e,&f),b+=e,c+=f;}

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

download

return to the top page