Programing Puzzles (another bonus)

BCS ao at pathlink.com
Wed Aug 6 17:30:21 PDT 2008


char a=0,b=0,c=0,d=0;
while(a<5 || b<9 || c<5 || d<9)
{
   writef("%d%d:%d%d\n", a,b,c,d);

   // add a single /expression/ here
}

make that count from "00:00" to "59:59" (minutes and seconds)

I seem to remember I figured this out once, but I don't remember how I did it.




More information about the Digitalmars-d-learn mailing list