#include <stdio.h>;
 static char day [7][10] = {
	"SUNDAY   ",
	"MONDAY   ",
	"TUESDAY  ",
	"WEDNESDAY",
	"THURSDAY ",
	"FRIDAY   ",
	"SATURDAY "
 };
main ()
{
 struct time {
	int year;
	int month;
	int day;
	int hour;
	int minute;
	int second;
	int tick;
	int tsec;
  } buffer;

rtime(&buffer);
printf ("%s is a %s\n", ctime(&buffer), day[dayofweek(&buffer)] );
}
