/************************************************************************/
/* practice 1 第二章作业 */
/************************************************************************/
void p2_1(void)
{
printf("John Xu\n");
printf("John\nXu\n");
printf("John");
printf(" Xu\n");
return;
}

/************************************************************************/
/* practice 2 第二章作业 */
/************************************************************************/
void p2_2(void)
{
printf("John Xu\n");
printf("address:ZHUHAI\n");
return;
}

/************************************************************************/
/* practice 3 第二章作业 */
/************************************************************************/
void p2_3(void)
{
int myAge;
int myDay;
printf("Please input your age:\n");
scanf("%d",&myAge);
myDay = myAge * 365;
printf("You've been alive for %d days",myDay);
return;
}

/************************************/
/* practice 4 第二章作业 */
/***********************************/
void jolly()
{
printf("For he's a jolly good fellow!\n");
}
void deny()
{
printf("Which nobody can deny!\n");
}
int main()
{
jolly();
jolly();
jolly();
deny();
return 0;
}

/************************************/
/* practice 5 第二章作业 */
/***********************************/

void br(void)
{
printf("Brazill,Russia");
}
void ic(void)
{
printf("India,China");
}

int main()
{
br();
printf(",");
ic();
printf("\n");
ic();
printf(",\n");
br();
return 0;
}
/************************************/
/* practice 6 第二章作业 */
/***********************************/

void p2_6()
{
int toes = 10;
int double_toes,square_toes;
double_toes = toes * 2;
square_toes = toes * toes;
printf("The int value toes is : %d\n",toes);
printf("the value of double toes is : %d\n", double_toes);
printf("the value of square toes is : %d\n", square_toes);
}
int main()
{
p2_6();
return 0;
}

/************************************/
/* practice 7 第二章作业 */
/***********************************/
void Smile()
{
printf("Smile!");
}
int main()
{
Smile();
Smile();
Smile();
printf("\n");
Smile();
Smile();
printf("\n");
Smile();
return 0;
}

/************************************/
/* practice 8 第二章作业 */
/***********************************/
void two()
{
printf("two\n");
}
void one_three()
{
printf("one\n");
two();
printf("three\n");
printf("done!");
}
int main()
{
printf("starting now:\n");
one_three();
return 0;
}

转载于:https://www.cnblogs.com/xuxubot/p/9775999.html

C Primer Plus 第6版第二章的作业相关推荐

  1. C++ Primer Plus 第六版第二章编程练习答案

    1.编写一个c++程序,它显示您的姓名和地址. #include<iostream> int main() {using namespace std;cout << " ...

  2. 计算机组成与结构第二章ppt,计算机组成原理(华科版)第二章 运算方法与运算器.ppt...

    文档介绍: 第二章运算方法与运算器 2.1 数据信息的表示方法 2.1.1数值数据的表示 淘在盛纬娃消镶勉桌乡利亚钦沙隐酋谴牲斗丙茸乔泛戊篡汽栽辫滔矮空芥计算机组成原理(华科版)第二章运算方法与运算器 ...

  3. 04737 c++ 自学考试2019版 第二章课后程序设计题 3

    /* * 04737 c++ 自学考试2019版 第二章课后练习 * 程序设计题 3 * 需求:设计并实现一个类MyLine */ //标准流 #include<iostream> //科 ...

  4. 04737 c++ 自学考试2019版 第二章课后程序设计题 2

    /* * 04737 c++ 自学考试2019版 第二章课后练习 * 程序设计题 2 * 需求:设计并实现二维坐标系下点的类Point.... */ //标准流 #include<iostrea ...

  5. 数字图像处理--冈萨雷斯第4版--第二章 数字图像基础

    数字图像处理--冈萨雷斯版--第二章 第二章 数字图像基础 2.1 视觉感知要素 2.1.1 人眼的结构 2.1.2 人眼中图像的形成 2.1.3 亮度适应与辨别 2.2 光和电磁波谱 2.3 图像感 ...

  6. 琼斯是计算体心立方弹性模量_固体物理 课后习题解答(黄昆版)第二章

    固体物理 课后习题解答(黄昆版)第二章 (5页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 4.9 积分 ???????????? 黄昆 固体物理 习题解 ...

  7. 数据库系统概论第五版第二章习题6

    (SPJ数据库查询操作) 数据库系统概论第五版第二章习题6(SPJ数据库查询操作)_FunPony的博客-CSDN博客

  8. 算法导论第三版第二章思考题答案

    算法导论第三版第二章思考题答案 第二章思考题 算法导论第三版第二章思考题答案 2.1 2.2 2.3 2.4 汇总传送门 2.1 #include<iostream> using name ...

  9. Spring实战第五版第二章字段校验返回视图报错解决及javax.validation完整pom依赖

    Spring实战第五版第二章 2.3 校验表单输入 在编写"/design"页面post处理逻辑时,按照书本上直接'return "design"; '方式,会 ...

  10. SQL基础教程MICK版 ···第二章总结

    SQL基础教程MICK版 ···第二章总结 前期准备 SELECT 语句基础 算术运算符.比较运算符和 NOT运算符 特殊的NULL 逻辑运算符 前期准备 应用第一章学的 建一个数据库 在该库中 建立 ...

最新文章

  1. 这次终于不再为 iptables 犯迷糊了!
  2. 记录一次nginx升级,支持ipv4和ipv6访问https
  3. iis php cgi.exe 漏洞,IIS4\IIS5 CGI环境块伪造0day漏洞
  4. [源码和文档分享]基于C++实现的运动会统分系统
  5. Ubuntu LXC
  6. [多图]全球范围内Linux用户普及度数据
  7. day028 Tcp和Udp协议
  8. 战队不显示名字了_年仅17岁的新人选手!峡谷之巅1200分!被16家战队哄抢
  9. OpenEphyra学习笔记1
  10. Myeclipse错误:Errors occurred during the build. 解决方法
  11. MySQL书籍和资料
  12. 淘淘商城项目mysql,idea搭建淘淘商城项目
  13. 如何保证战略落地_企业战略如何实现落地
  14. 20201022-成信大-C语言程序设计-20201学期《C语言程序设计B》C-trainingExercises15
  15. word文档中添加公式、插入数学公式及其编号
  16. 分享一段工具型代码:印章抠图
  17. 废物的靶场日记 hackthebox-Paper
  18. linux服务器重启原因排查_Linux服务器不明原因重启了,怎么查找原因
  19. matlab无法加载dll文件,MATLAB帮助例子“无法加载dll”问题
  20. STM32智能小车------TCRT5000循迹

热门文章

  1. 全网首发:CENTOS FreeSwitch集成NVIDIA CODEC
  2. 为何吾博客周排名没有数字显示?
  3. ubuntu apt-get 安装软件时自动yes
  4. 电脑显示器尽快触摸化
  5. XCODE中,修改苹果APP支持哪些设备
  6. 进程标识符及fork
  7. ionic 网站放在服务器,Ionic4 服务器插件-服务器Httpd - Ionic Native
  8. python read_csv dtype_Pandas read_csv low_memory和dtype选项
  9. 关于boot.ini文件里的/noexecute=optin
  10. 前大嗅万万没想到系列之520奇葩礼物大盘点,活着不好吗?