C++语言基础教程 教学课件 作者 吕凤翥习题答案 1_ 第7章.docVIP

  • 7
  • 0
  • 约2.25千字
  • 约 3页
  • 2019-10-04 发布于广东
  • 举报

C++语言基础教程 教学课件 作者 吕凤翥习题答案 1_ 第7章.doc

PAGE PAGE 1 第7章 习题解答 7.1判断题 对的有1,2,5,8,9 7.2单选题 ADBCB 7.3填空题 1. struct union 2. 1 4 6 8 3. px-p-b x.p-a 4. union d x={9}; 7.4程序结果 Wang ping:98.5 10,15 2:4 1 3 5 1: break 2: while 3: switch BEI JING! 7.5编程题 1. #include iostream.h struct date { int day,month,year; }; int month_days[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; void main() { struct date d1; int days=0; coutEnter date: ; cind1.yeard1.monthd1.day; for(int i=1;id1.month;i++) days+=month_days[i]; if(d1.month2(d1.year%4==0d1.year%100!=0||d1.year%400==0)) days++; coutYear=d1.y

文档评论(0)

1亿VIP精品文档

相关文档