C++PrimerPlus中文第六版第五章编程练习

上传人:woxinch****an2018 文档编号:39261529 上传时间:2018-05-13 格式:DOCX 页数:6 大小:16.09KB
返回 下载 相关 举报
C++PrimerPlus中文第六版第五章编程练习_第1页
第1页 / 共6页
C++PrimerPlus中文第六版第五章编程练习_第2页
第2页 / 共6页
C++PrimerPlus中文第六版第五章编程练习_第3页
第3页 / 共6页
C++PrimerPlus中文第六版第五章编程练习_第4页
第4页 / 共6页
C++PrimerPlus中文第六版第五章编程练习_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《C++PrimerPlus中文第六版第五章编程练习》由会员分享,可在线阅读,更多相关《C++PrimerPlus中文第六版第五章编程练习(6页珍藏版)》请在金锄头文库上搜索。

1、C+PrimerPlusC+PrimerPlus 中文第六版第五中文第六版第五章编程练习章编程练习/刚接触C+,学习过程中自己编写的课后练习。只用了一个main函数,用注释把各个题目分开了 / practice.cpp : 定义控制台应用程序的入口点。 /#include “stdafx.h“ #include #include /#include int main() using namespace std; /1 /* int min_int,max_int; long count = 0; cout min_int; cout max_int; for (;min_int shu; wh

2、ile ( shu!=0 ) he += shu; cout shu; cout shuliangi; for (i = 0,shuliang12 = 0;i three_yearsij; three_yearsi12 += three_yearsij; for (i = 0;i qicheshu; cin.get();/避免getline()读入空行 car * pt = new carqicheshu; int i; for (i = 0;i shengchanshang); cout (pt + i) - year; cin.get();/避免getline()读入空行 cout yea

3、r shengchanshang word; while (strcmp(word,“done“) != 0) count+; cin word; cout str; while (str != “done“) count+; cin str; cout star; int i,j; for (i = 1; i = star;i+) for (j = 0;j star - i;j+) cout “.“; for (;j star;j+) cout “*“; cout endl; cout “Press any key to return.“; cin.get(); cin.get(); return 0;

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

最新文档


当前位置:首页 > 中学教育 > 高中教育

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