欢迎来到天天文库
浏览记录
ID:27781744
大小:359.50 KB
页数:131页
时间:2018-12-06
《《c++程序设计》谭浩强课后习题答案解析32100》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、完美WORD格式第一章1.5题#includeusingnamespacestd;intmain(){cout<<"This"<<"is";cout<<"a"<<"C++";cout<<"program.";return0;1.6题#includeusingnamespacestd;intmain(){inta,b,c;a=10;b=23;c=a+b;cout<<"a+b=";cout<2、stream>usingnamespacestd;intmain(){inta,b,c;intf(intx,inty,intz);cin>>a>>b>>c;c=f(a,b,c);cout<usingnamespacestd;intmain(){inta,b,c;3、cin>>a>>b;c=a+b;cout<<"a+b="<usingnamespacestd;intmain(){inta,b,c;intadd(intx,inty);cin>>a>>b;c=add(a,b);cout<<"a+b="<usingnamespace4、std;intmain(){charc1='a',c2='b',c3='c',c4='101',c5='116';cout<usingnamespacestd;intmain(){charc1='C',c2='+',c3='+';专业整理知识分享完美WORD格式cout<<"Isay:""<5、<"tt"<<"Hesays:"C++isveryinteresting!""<<'';return0;}2.7题#includeusingnamespacestd;intmain(){inti,j,m,n;i=8;j=10;m=++i+j++;n=(++i)+(++j)+m;cout<usingnamespacestd;intmain()6、{charc1='C',c2='h',c3='i',c4='n',c5='a';c1+=4;c2+=4;c3+=4;c4+=4;c5+=4;cout<<"passwordis:"<#includeusingnamespacestd;intmain(){floath,r,l,s,sq,vq,vz;constfloatpi=3.1415926;cout<<"pleaseente7、rr,h:";cin>>r>>h;l=2*pi*r;s=r*r*pi;sq=4*pi*r*r;vq=3.0/4.0*pi*r*r*r;vz=pi*r*r*h;cout<8、endl;cout<<"vq="<usingnamespacestd;intmain(){floatc,f;cout<<"请输入一个华氏温度:";cin>>f;c=(5.0/9.0)*(f-32);//注意5和9要用实型表示,否则5/9值为0cout<<"摄氏温度为:"<
2、stream>usingnamespacestd;intmain(){inta,b,c;intf(intx,inty,intz);cin>>a>>b>>c;c=f(a,b,c);cout<usingnamespacestd;intmain(){inta,b,c;
3、cin>>a>>b;c=a+b;cout<<"a+b="<usingnamespacestd;intmain(){inta,b,c;intadd(intx,inty);cin>>a>>b;c=add(a,b);cout<<"a+b="<usingnamespace
4、std;intmain(){charc1='a',c2='b',c3='c',c4='101',c5='116';cout<usingnamespacestd;intmain(){charc1='C',c2='+',c3='+';专业整理知识分享完美WORD格式cout<<"Isay:""<5、<"tt"<<"Hesays:"C++isveryinteresting!""<<'';return0;}2.7题#includeusingnamespacestd;intmain(){inti,j,m,n;i=8;j=10;m=++i+j++;n=(++i)+(++j)+m;cout<usingnamespacestd;intmain()6、{charc1='C',c2='h',c3='i',c4='n',c5='a';c1+=4;c2+=4;c3+=4;c4+=4;c5+=4;cout<<"passwordis:"<#includeusingnamespacestd;intmain(){floath,r,l,s,sq,vq,vz;constfloatpi=3.1415926;cout<<"pleaseente7、rr,h:";cin>>r>>h;l=2*pi*r;s=r*r*pi;sq=4*pi*r*r;vq=3.0/4.0*pi*r*r*r;vz=pi*r*r*h;cout<8、endl;cout<<"vq="<usingnamespacestd;intmain(){floatc,f;cout<<"请输入一个华氏温度:";cin>>f;c=(5.0/9.0)*(f-32);//注意5和9要用实型表示,否则5/9值为0cout<<"摄氏温度为:"<
5、<"tt"<<"Hesays:"C++isveryinteresting!""<<'';return0;}2.7题#includeusingnamespacestd;intmain(){inti,j,m,n;i=8;j=10;m=++i+j++;n=(++i)+(++j)+m;cout<usingnamespacestd;intmain()
6、{charc1='C',c2='h',c3='i',c4='n',c5='a';c1+=4;c2+=4;c3+=4;c4+=4;c5+=4;cout<<"passwordis:"<#includeusingnamespacestd;intmain(){floath,r,l,s,sq,vq,vz;constfloatpi=3.1415926;cout<<"pleaseente
7、rr,h:";cin>>r>>h;l=2*pi*r;s=r*r*pi;sq=4*pi*r*r;vq=3.0/4.0*pi*r*r*r;vz=pi*r*r*h;cout<8、endl;cout<<"vq="<usingnamespacestd;intmain(){floatc,f;cout<<"请输入一个华氏温度:";cin>>f;c=(5.0/9.0)*(f-32);//注意5和9要用实型表示,否则5/9值为0cout<<"摄氏温度为:"<
8、endl;cout<<"vq="<usingnamespacestd;intmain(){floatc,f;cout<<"请输入一个华氏温度:";cin>>f;c=(5.0/9.0)*(f-32);//注意5和9要用实型表示,否则5/9值为0cout<<"摄氏温度为:"<
此文档下载收益归作者所有