三日坊主
860 ワード
/* 1990 1 1 , ;
, */
#include"stdio.h"
struct time
{
int year;
int month;
int day;
};
int main()
{ int sumday=0;
struct time times;
printf("Give your year:");
scanf("%d",×.year);
printf("Give your month:");
scanf("%d",×.month);
printf("Give your day:");
scanf("%d",×.day);
int i;
for(i=1990;i2&×.year%4==0&×.year%100!=0||times.year%400==0)
sumday=sumday+29;
else if(times.month>2)
sumday=sumday+28;
sumday=sumday+times.day;
if(sumday%5<=3&&sumday%5>=1)
printf("
");
else
printf("
");
return 0;
}