/* timetab2.c */

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

static int leap (unsigned int y)
{
  return y % 4 != 0 ? 0 : y % 100 != 0 ? 1 : y % 400 != 0 ? 0 : 1;
}

int main (int argc, char *argv[])
{
  int y;
  time_t x;

  x = 0;
  for (y = 1970; y <= 2106; ++y)
    {
      printf ("%lu\n", (unsigned long)x);
      x += 365 + leap (y);
    }
  return 0;
}
