- 5
- 0
- 约4.31万字
- 约 25页
- 2016-12-11 发布于重庆
- 举报
C面向对象程序设计答案18章_谭浩强1.
第一章
5:
#include iostream
using namespace std;
int main()
{
coutThisis;
coutaC++;
coutprogram.endl;
return 0;
}
6:
#include iostream
using namespace std;
int main()
{
int a,b,c;
a=10;
b=23;
c=a+b;
couta+b=;
coutc;
coutendl;
return 0;
}
7:
#include iostream
using namespace std;
int main()
{
int a,b,c;
int f(int x,int y,int z);
cinabc;
c=f(a,b,c);
coutcendl;
return 0;
}
int f(int x,int y,int z)
{
int m;
if (xy) m=x;else m=y;
if (zm) m=z;
return(m);}
8: #include iostream
using namespace std;
int main()
{
int a,b,c;
cinab;
c=a+b;
couta+b=a+bendl;
return 0;
}9:
您可能关注的文档
最近下载
- 深度解析(2026)《GBT 8923.3-2009 涂覆涂料前钢材表面处理 表面清洁度的目视评定 第 3 部分:焊缝、边缘和其他区域的表面缺陷的处理等级》.pptx VIP
- 2024年社区信托制物业的实践与思考.docx VIP
- 【高清可复制】G13—100SQF化粪池图集.docx VIP
- 螺锁式连接预应力混凝土实心异型方桩(Q320582 ZD026-2019)图集.docx VIP
- 基于STM32智能拐杖设计.docx VIP
- 杭州地铁一号线萧山湘湖站安全事故调查报告.doc VIP
- 萧山体育招聘真题及答案.doc VIP
- 【备考2026】云南省中考模拟数学试卷2(含解析).doc.pdf VIP
- 第5课 弘扬劳动精神、劳模精神、工匠精神 课件(共16张).pptx
- 2026反假上机考试必背题库200道及参考答案(轻巧夺冠).docx VIP
原创力文档

文档评论(0)