C++编程复习题A

上传人:飞*** 文档编号:47107467 上传时间:2018-06-29 格式:PDF 页数:18 大小:55.50KB
返回 下载 相关 举报
C++编程复习题A_第1页
第1页 / 共18页
C++编程复习题A_第2页
第2页 / 共18页
C++编程复习题A_第3页
第3页 / 共18页
C++编程复习题A_第4页
第4页 / 共18页
C++编程复习题A_第5页
第5页 / 共18页
点击查看更多>>
资源描述

《C++编程复习题A》由会员分享,可在线阅读,更多相关《C++编程复习题A(18页珍藏版)》请在金锄头文库上搜索。

1、第 1 页 共 18 页C+ 编程复习题A 01、编写一个 C+程序以求出:大于0 且小于 1001的偶数之和。#include using namespace std; void main() int j=0; for(int i=1;i using namespace std; void main() int j=0; for(int i=1;i #include using namespace std; void main() int i=10,j=0; while (j #include using namespace std; void main() int i=10,j=0; 第

2、3 页 共 18 页while (j #include using namespace std; void main() int i=1,j=0; while (j #include 第 4 页 共 18 页using namespace std; void main() int i=1,j=0; while (j #define f(a,b,c) (ab?(ac?a:c):(bc?b:c) using namespace std; void main() int a,b,c; cinabc; cout #define f(a,b,c) (aabc; cout using namespace

3、std; void main() int x,y; cinxy; cout using namespace std; 第 6 页 共 18 页void main() int a,b,c; cinabc; cout using namespace std; void main() int i,j=0; for(i=100;i using namespace std; void main() int i,j=0; for(i=100;i #include using namespace std; void main() double j=200,k=200; for(int i=1;i #incl

4、ude using namespace std; 第 9 页 共 18 页void main() double j=1; for(double i=2;i #include using namespace std; void main() double j=0,k=1,l=2; for(int i=0;i #include using namespace std; void main() char a100; cina; for(int i=0;i=A void main() char a100; cina; for(int i=0;i=a void main() double t,k,a,b

5、; int j; cinab; 第 12 页 共 18 页t=a*0.300+b*0.700; j=(int)t; k=t-j; k*=10; if(k #include using namespace std; int a(int i) for(int j=2;j #include 第 14 页 共 18 页#include using namespace std; void main() double x1,x2,a; cina; x1=sqrt(a); cout using namespace std; void main() int l; for(int i=1;i #include

6、using namespace std; void main() double b; for(double i=0;i #include using namespace std; void main() int a10; for(int i=0;i=0;j-) cout using namespace std; int sign(double b) if(bb; cout using namespace std; double centigrade( int fahrenheit ) double l; l=5.0/9.0*(fahrenheit-32); return l; void main() 第 18 页 共 18 页 int b; cinb; cout using namespace std; void stringCopy( char *from, char *to ) to=from; couttoendl; void main() char s1=“abcdef“,*p; stringCopy(s1,p);

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号