欢迎来到天天文库
浏览记录
ID:55550158
大小:143.00 KB
页数:59页
时间:2020-05-16
《C++经典练习程序代码.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、#includemain(){//用SIZEOF计算常量长度cout<<"sizeof('$')="<2、l;cout<<"sizeof(c)="<3、ndl;cout<<"sizeof(double)="<4、atsum_grade;};ststudent1;cout<<"sizeof(st)="<main()//测试表达式类型转换{intn=100,m;doublex=3.791,y;cout<<"nx="<5、int)x="<<(int)x<main(){intscore;cout<<"score=";cin>>score;if(score<0score>100){cout<<"Thescoreiso6、utofrange!"<=90)cout<<"yougrageisaA"<=80)cout<<"yougradeisaB"<=70)cout<<"yougradeisaC"<=60)cout<<"yougradeisaD"<main(){intx,y,z;charc1;cin>>x>>c1>>y;switch(c1){case'7、+':cout<
2、l;cout<<"sizeof(c)="<3、ndl;cout<<"sizeof(double)="<4、atsum_grade;};ststudent1;cout<<"sizeof(st)="<main()//测试表达式类型转换{intn=100,m;doublex=3.791,y;cout<<"nx="<5、int)x="<<(int)x<main(){intscore;cout<<"score=";cin>>score;if(score<0score>100){cout<<"Thescoreiso6、utofrange!"<=90)cout<<"yougrageisaA"<=80)cout<<"yougradeisaB"<=70)cout<<"yougradeisaC"<=60)cout<<"yougradeisaD"<main(){intx,y,z;charc1;cin>>x>>c1>>y;switch(c1){case'7、+':cout<
3、ndl;cout<<"sizeof(double)="<4、atsum_grade;};ststudent1;cout<<"sizeof(st)="<main()//测试表达式类型转换{intn=100,m;doublex=3.791,y;cout<<"nx="<5、int)x="<<(int)x<main(){intscore;cout<<"score=";cin>>score;if(score<0score>100){cout<<"Thescoreiso6、utofrange!"<=90)cout<<"yougrageisaA"<=80)cout<<"yougradeisaB"<=70)cout<<"yougradeisaC"<=60)cout<<"yougradeisaD"<main(){intx,y,z;charc1;cin>>x>>c1>>y;switch(c1){case'7、+':cout<
4、atsum_grade;};ststudent1;cout<<"sizeof(st)="<main()//测试表达式类型转换{intn=100,m;doublex=3.791,y;cout<<"nx="<5、int)x="<<(int)x<main(){intscore;cout<<"score=";cin>>score;if(score<0score>100){cout<<"Thescoreiso6、utofrange!"<=90)cout<<"yougrageisaA"<=80)cout<<"yougradeisaB"<=70)cout<<"yougradeisaC"<=60)cout<<"yougradeisaD"<main(){intx,y,z;charc1;cin>>x>>c1>>y;switch(c1){case'7、+':cout<
5、int)x="<<(int)x<main(){intscore;cout<<"score=";cin>>score;if(score<0score>100){cout<<"Thescoreiso
6、utofrange!"<=90)cout<<"yougrageisaA"<=80)cout<<"yougradeisaB"<=70)cout<<"yougradeisaC"<=60)cout<<"yougradeisaD"<main(){intx,y,z;charc1;cin>>x>>c1>>y;switch(c1){case'
7、+':cout<
此文档下载收益归作者所有