欢迎来到天天文库
浏览记录
ID:37918193
大小:424.00 KB
页数:19页
时间:2019-06-02
《C语言课后实验答案》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、3.15.P161.#includeusingnamespacestd;intmain(){cout<<"Iamastudent,andIlikeprogramming!"<usingnamespacestd;intmain(){doublea,b,c;cout<<"输入2个数:";cin>>a>>b;c=a*b;cout<2、deusingnamespacestd;intmain(){chardate[41];cout<>date;cout<#includeusingnamespacestd;intmain(){doublea,b,3、h,s;inti,n;a=-1.0;b=1.0;n=200;h=(b-a)/n;s=(sin(a)+sin(b))/2;for(i=1;iusingnamespacestd;doublearea(doublelength,doublewidth){doublea;a=length*width;returna;}intmain(){cou4、t<<"长为3,宽为4的矩形面积是:"<>l>>w;cout<<"长:"<#includeusingnamespacestd;intmain(){doublea,b,c,s,area;cout<<"输入a,b,c=";cin>>a>>b>>c;if(a5、+b<=c6、7、a+c<=b8、9、c+b<=a)cout<<"Errordata"<#includeusingnamespacestd;intmain(){doublea,b,c;cout<<"输入a,b";cin>>a>>b;doublem=fabs(a)+fabs(10、b);c=sin(m)/aqrt(cos(m));cout<<"c="<usingnamespacestd;intmain(){doublea,b,c;cout<<"输入3个小数:"<>a>>b>>c;cout<<"你输入的3个小数:"<11、是:"<usingnamespacestd;intmain(){inta,b,c;doubleaverage;cout<<"输入3个数:"<>a>>b>>c;average=(a+b+c)/3.0;cout<<"average="<usingnamespacestd;intmain(){int12、n,u=1;cout<<"pleaseinputaninteger:";cin>>n;for(inti=1;i<=n;i=i+1)u=u*i;cout<intmain(){intsum=0,u=1;for(inti=1;i<=10;i=i+1){u=u*i;sum=sum+u;}cout<<"sum="<intmain(){
2、deusingnamespacestd;intmain(){chardate[41];cout<>date;cout<#includeusingnamespacestd;intmain(){doublea,b,
3、h,s;inti,n;a=-1.0;b=1.0;n=200;h=(b-a)/n;s=(sin(a)+sin(b))/2;for(i=1;iusingnamespacestd;doublearea(doublelength,doublewidth){doublea;a=length*width;returna;}intmain(){cou
4、t<<"长为3,宽为4的矩形面积是:"<>l>>w;cout<<"长:"<#includeusingnamespacestd;intmain(){doublea,b,c,s,area;cout<<"输入a,b,c=";cin>>a>>b>>c;if(a
5、+b<=c
6、
7、a+c<=b
8、
9、c+b<=a)cout<<"Errordata"<#includeusingnamespacestd;intmain(){doublea,b,c;cout<<"输入a,b";cin>>a>>b;doublem=fabs(a)+fabs(
10、b);c=sin(m)/aqrt(cos(m));cout<<"c="<usingnamespacestd;intmain(){doublea,b,c;cout<<"输入3个小数:"<>a>>b>>c;cout<<"你输入的3个小数:"<11、是:"<usingnamespacestd;intmain(){inta,b,c;doubleaverage;cout<<"输入3个数:"<>a>>b>>c;average=(a+b+c)/3.0;cout<<"average="<usingnamespacestd;intmain(){int12、n,u=1;cout<<"pleaseinputaninteger:";cin>>n;for(inti=1;i<=n;i=i+1)u=u*i;cout<intmain(){intsum=0,u=1;for(inti=1;i<=10;i=i+1){u=u*i;sum=sum+u;}cout<<"sum="<intmain(){
11、是:"<usingnamespacestd;intmain(){inta,b,c;doubleaverage;cout<<"输入3个数:"<>a>>b>>c;average=(a+b+c)/3.0;cout<<"average="<usingnamespacestd;intmain(){int
12、n,u=1;cout<<"pleaseinputaninteger:";cin>>n;for(inti=1;i<=n;i=i+1)u=u*i;cout<intmain(){intsum=0,u=1;for(inti=1;i<=10;i=i+1){u=u*i;sum=sum+u;}cout<<"sum="<intmain(){
此文档下载收益归作者所有