加一功能
摘要:#include<stdlib.h>#include<stdio.h>structday{intyear;intmonth;intdays;}Day;voideveryday(){inttian(structday);intt;printf("\t\t\t请输入年月日(********):");scanf("%d%d%d",&Day.year,&Day.month,&Day.days);t=tian(Day);printf("\t\t\t%5d年%3d月%d日是该年的第%d天",Day.year,Day.month,Day.days,t);}inttian(structdayday1){inta[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};inti,j,sum=0;i=(((day1.year%4==0)&&(day1.year%100!=0))||(day1.year%400==0));for(j=0;j<day1.month;j++)sum+=a[i][j];sum=sum+day1.days;returnsum;}longintf(intyear,intmonth){if(month<3)returnyear-1;elsereturnyear;}longintg(intmonth){if(month<3)returnmonth+13;elsereturnmonth+1;}longintn(intyear,intmo
温馨提示:当前文档最多只能预览
5 页,若文档总页数超出了
5 页,请下载原文档以浏览全部内容。
本文档由 匿名用户 于 2022-05-28 23:21:52上传分享