C++语言程序设计试卷 A(2005、1、10)
标准答案(卷面分数 60 分)
一、选择题(每题 1.5 分,共 30 分)
二、阅读程序,请写出程序执行后的输出结果。 (每题 4 分,共 12 分)
1、输出结果:(每行 2 分)
第一行: 3 8
第二行: 4 9.6
2、输出结果:(每行 1 分)
第一行:Old number a:285
第二行:结果数:582
第三行:Old number b:3769
第四行:结果数:93
3、输出结果:(每行 1 分)
第一行:Point_A:x=20 y=40
第二行:Point_B:x=0 y=0
第三行:Point_C:x=50 y=20
第四行:the result is:800
三、完善程序(每个填空 1.5 分,共 18 分)
1、验证歌德巴赫猜想
(1) n%m= =0
(2) return 1;
(3) n+=2
(4) prime(n-i)
2 、商品类 CPc
(1) int a,double b,int c,int d,int e
(2) CPc &B
(3) friend void
(4) Price*Amount
(5) that.Id==Id&&that.Price==Price
(6) break
(7) daynum+day
(8) CPc &P
评论0
最新资源