三天打渔问题#include “stdio.h“#define YEAR 2000#define DAYS 365int TotalDays(int year,int month,int day);int a = 0,31,28,31,30,31,30,31,31,30,31,30,31;int main()int totalday;int year,month,day;printf(“请输入年月日:“);scanf(“%d-%d-%d“,totalday = TotalDays(year,month,day);printf(“%d-%d-%d 是:“,year,month,day);if (totalday % 5 = 0 | totalday % 5 = 4)printf(“晒网日!n“);elseprintf(“打鱼日!n“);return 0;/统计当前的天数int TotalDays(int year,int month,int day)int i = year - YEAR;int i_month = 1;int totalday = day;if ( year%4 = 0 while (i_month 0 )totalday += DAYS*i + (i-1)/4 + 1;return totalday;