从键盘输入日期解析然后判断是星期几的问题,怎么实现星期的计算用的是C程序的编写的代码

Problem Description
Today is Saturday, 17th Nov,2007. Now, if i tell you a date, can you tell me what day it is ?

Input
There are multiply cases.
One line is one case.
There are three integers, year(0<year<10000), month(0<=month<13), day(0<=day<32).

Output
Output one line.
if the date is illegal, you should output "illegal". Or, you should output what day it is.

Sample Input
2007 11 17

Sample Output
Saturday

#Today is Saturday, 17th Nov,2007.已经确定了某一天是星期几了,算出要求的那一天与这一天相差多少天,再对7取余就可以算出在一星期范围内的差值。之后根据具体情况运算就好了。#