精选安徽工业大学软件工程实验报告.docx





《精选安徽工业大学软件工程实验报告.docx》由会员分享,可在线阅读,更多相关《精选安徽工业大学软件工程实验报告.docx(28页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选安徽工业大学软件工程实 验报告printf(”请输入年份(L3000):); for(i=0;i80;+i)si=getchar();if(si=27)exit(O);if(si=10) break;)for(i=0;i80;+i)(if(si=10) break;else if(!isdigit(si) return y;)y=atoi(s);return y;/*This module is to accept monthinfo, and print the whole year calender. */void output(struct info monthinfo)(char
2、ch;doprinthead(monthinfo);printmonth(monthinfo);printf(按任意键显视下一月,按 Esc键退出.iT);ch=getchar();if(ch=27)exit(O);monthinfo=setmonthinfo(monthinfo);while(monthinfo.month13);/* This module is to accept monthinfo, amd print monthly head like 一 月 */void printhead(struct info monthinfo)(char *ss;printf(n %sn,
3、dent);switch(monthinfo.month)(ss=一 月;break;ss=nZ2 月”;break;ss=三 月;break;ss=四 月;break;ss=五 月;10break;case 1: ss=六月; break;ss=七 月;break;ss=八月; break;case 2: ss=九 月; break;ss=十月; break;case 3: ss=十一 月;break;case 4: ss=十二 月;)printf(n %s%s%s%snnn9gap9gap9g ap,ss);) 11/* This module is to accept monthinfo
4、, and print the numbered dates of the month.*/void printmonth(struct info monthinfo)(intprintf(n % s n ,dent);printf( - %s Zl%s H%s五 %s 六 %s 日nn ” 也ap,gap,gap,gap,gap,gap);printf(n %s,dent);for(i=l;imonthinfo.firstdayofmonth;i=i+1)printf(n%s ,gap);12k=monthinfo.firstdayofmonth;for(j=l;j 7)(k=k-7;pri
5、ntf(nnn%sn9dent););k=k+l;printf(n%2d%snJ,gap);)printf(nnnn);)/* This module is to accept the monthinfo, and set the monthinfo of next13month.*/struct info setmonthinfo(struct info monthinfo)(int m;monthinfo.firstdayofmonth=(monthinfo.firstdayofmonth+ monthinfo.daysofmonth-1) %7+l;monthinfo.month=mon
6、thinfo.month+1;monthinfo.daysofmonth=30;m=monthinfo.month;if(m=l | m=3 | m=5 | m=7 | m=8 | m=10 | m =12)monthinfo.daysofmonth=31;if(m=2)14if(monthinfo.leap)monthinfo.daysofmonth = 29;elsemonthinfo.daysofmonth = 28;)return monthinfo;)/* This module is to initialize the monthinfo. */struct info setini
7、t(int year)(int i,days,total;struct info monthinfo;monthinfo.month=l;monthinfo.firstdayofmonth=firstdayofl;for(i=l ;iyear ;i=i+l)15if(isleap(i)days=366;elsedays=365 ;monthinfo.firstdayofmonth=(monthinfo.fi rstdayofmonth+days-l)%7+l;monthinfo.daysofmonth=31; monthinfo.leap=isleap(year);return monthin
8、fo;void main()printf(n 才 才 rj rjw rj rj rjw rjw rjw rjw rj rj rj rj rjw rjw rjw rjw rj rj rjw rjw rjw rj rj rjw rjw r|w rjw rjw rj rjw rjw rjw*n);printf(n使用万年历printf(n使用万年历tt欢送演示程序16printf(nl* 才 才 rj rj rj rj rjw rjw rj rjw rj rjw rj rjw rjw rjw rjw rj rj rj rjw rjw rjw rj rj rjw rj rjw rjw rjw rj r
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 精选 安徽 工业大学 软件工程 实验 报告

限制150内