鱼C论坛

 找回密码
 立即注册
分享 C++Primer Plus 第六版编程练习7.13-8(1)
ltt1986 2015-7-4 02:21
//方案1 #include iostream using namespace std ; const int Seasons = 4 ; const char str1 = {"Spring" ,"Summer","Fall","Winter"} ; void fill( int num ,int n) ; int main() { int num ; fill(num ,Seasons) ; show(num ,Seasons) ; &n ...
个人分类: c++Primer Plus 第6版编程练习笔记|92 次阅读|0 个评论
分享 C++Primer Plus 第六版编程练习7.13-7
ltt1986 2015-7-4 00:20
#include iostream using namespace std ; const int SIZE = 10 ; double * Fill_array(double *pa, int n) ; void Show_array(double *begin , double *end) ; void Reverse_array(double *begin , double *end) ; int main() { double num ; double * pe = Fill_array(n ...
个人分类: c++Primer Plus 第6版编程练习笔记|85 次阅读|0 个评论
分享 C++Primer Plus 第六版编程练习7.13-6
ltt1986 2015-7-3 23:33
C++Primer Plus 第六版编程练习7.13-6
#include iostream using namespace std ; const int SIZE = 10 ; int Fill_array(double num , int n) ; void Reverse_array(double num ; int count = Fill_array(num , SIZE) ; cout"一共输入了 "count" 个数字!\n" ; Show_array ...
个人分类: c++Primer Plus 第6版编程练习笔记|113 次阅读|0 个评论
分享 C++Primer Plus 第六版编程练习7.13-5
ltt1986 2015-7-3 22:30
#include iostream using namespace std; long unsigned recursive(unsigned x) ; //递归函数 int main() { cout"请输入一个无符号整数(q退出):" ; unsigned temp ; while(cintemp) { ...
个人分类: c++Primer Plus 第6版编程练习笔记|79 次阅读|0 个评论
分享 C++Primer Plus 第六版编程练习7.13-4
ltt1986 2015-7-3 22:15
#include iostream using namespace std ; double chance(unsigned all ,unsigned choice) ; //计算几率的函数 int main() { double fieldnumber = chance(47,5) ; double specialnumber = chance(27,1) ; cout"中头奖的几率为:"fieldnumbe ...
个人分类: c++Primer Plus 第6版编程练习笔记|105 次阅读|0 个评论
分享 C++Primer Plus 第六版编程练习7.13-2
ltt1986 2015-7-3 21:31
#include iostream using namespace std; const int SIZE = 10 ; void get_value(double * p) ; void show_value(const double * p) ; void count_value(const double * p) ; int main() { double arr = {0}; //这里定义数组为10的话容易下标越界 ,因为我是用不等于0 ...
个人分类: c++Primer Plus 第6版编程练习笔记|123 次阅读|0 个评论
分享 c++primer plus 第6版编程练习7.13-1
ltt1986 2015-7-3 21:24
#include iostream using namespace std ; double aversum(double a ,double b) ; int main() { double x,y ; cout"请输入2个数(以0退出):\n" ; while(cinxy (x != 0) (y != 0)) { & ...
个人分类: c++Primer Plus 第6版编程练习笔记|108 次阅读|0 个评论
分享 C++Primer Plus第6版编程练习7.13-3
ltt1986 2015-7-3 21:18
#include iostream using namespace std ; struct box { char maker ; float height ; float width ; float length ; float volume ; }; void show_box(box pa) ; void set_volume(box *pb) ; int main() { &nb ...
个人分类: c++Primer Plus 第6版编程练习笔记|104 次阅读|0 个评论
12

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-18 12:23

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

返回顶部