C 程序设计万年历课程设计报告.docVIP

  • 20
  • 0
  • 约3.46千字
  • 约 7页
  • 2018-10-09 发布于重庆
  • 举报
C 程序设计万年历课程设计报告

C++程序设计-万年历课程设计报告 存档资料 成绩:  理工学院 课 程 设 计 报 告 书 所属课程名称 C++程序设计课程设计       题 目     万年历            分 院   电信分院      专业班级 2012级计算机 学  号         学生姓名         指导教师        72013 年 6月16 日 课 程 设 计 报 告 书 1 第一章 需求分析....................................................................3 第二章 概要设计....................................................................4 第三章 详细设计与编码 6 第四章 调试分析 9 第五章 用户使用说明 12 设计心得 13 参 考 文 献 14 致谢..........................................................................................14 第一章 需求分析 如今的社会是一个信息的时代,万年历作为日常中的一种小工具,它具有多方面的小工能,主要在日期的显示上给人以直观的表达效果,在日期的查询上方便简洁,还有就是在某些节日的提醒上都给我们带来极大的方便 是一种比较实用的小工具 第二章 概要设计 设计要求 程序完成运行时,能过正确的表达出所输入年份的万年历。 总体设计 实现操作流程图 程序设计流程图 第三章 详细设计与编码 源代码 #include #include using namespace std; int monthday int year,int month ; int newdays int year ; //输出日历表 int output int year int i,j,k,n; int firstmonthday[12]; char month[12][10] 一月 , 二月 , 三月 , 四月 , 五月 , 六月 , 七月 , 八月 , 九月 , 十月 , 十一月 , 十二月 ; char weekday[] 日 一 二 三 四 五 六 ; for i 0;i 12;i++ if i 0 firstmonthday[i] newdays year ; else firstmonthday[i] firstmonthday[i-1]+monthday year,i %7; int month1[6][7],month2[6][7],month3[6][7]; cout year 年 endl; for i 0;i 12;i+ 2 cout setw 4 month[i] setw 17 \t setw 4 month[i+1] endl; cout weekday \t weekday endl; for j 0;j 6;j++ for k 0;k 7;k++ month1[j][k] k+1-firstmonthday[i]+j*7; month2[j][k] k+1-firstmonthday[i+1]+j*7; for n 0;n 7;n++ if month1[j][n] 1||month1[j][n] monthday year,i+1 cout ; else cout setw 3 month1[j][n]; cout \t; for n 0;n 7;n++ if month2[j][n] 1||month

文档评论(0)

1亿VIP精品文档

相关文档