Code:
while(1)
{
 temp++;
 if (temp > 23)
 {
  temp = 42;
 }
 wait (1);
}


That's 3 lines in the sense of the contest. The semicolons count.