万年历C编程
生活休闲 >
随笔 >
其它 >
文档预览
8 页
979 浏览
3 收藏
4.8分
摘要:#include<stdio.h>#include<stdlib.h>#include<conio.h>#defineX"SunMonTueWedThuFriSat"voidmenu(){system("cls");printf("\nTHISISTHEMENUOFTHEPROGRAM!");printf("\nYOUCANCHOOSETHENUMBERFORTHEFUNCTIOM:");printf("\n\n");printf("1Findthedaybyyear-month-date.\n");printf("2Findoutwhethertheyearyouinputisaleapyear.\n");printf("3Printthecalendaroftheyearyouinput.\n");printf("4Exit.\n\n");printf("Inputyourchoice:");}intgetday(intyear,intmonth,intdate){intisleap(intyear);intflag,s,i;inta[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};intcont=0;flag=isleap(year);if(flag==1)a[2]++;for(i=1;i<month;i++){cont=cont+a[i];}cont=cont+date;s=year+1+(year-1)/4+(year-1)/100+(year-1)/400+cont;returns%7;}intisle
温馨提示:当前文档最多只能预览
5 页,若文档总页数超出了
5 页,请下载原文档以浏览全部内容。
本文档由 匿名用户 于 2022-10-08 23:11:47上传分享