2.7 输出地址和姓名(1
 #include <iostream>
 using namespace  std;
 int main()
 {
     int 距离;
     cout << "请输入距离" << endl;
     cin >> 距离;
     cout <<  << "码" << endl;

 }
     

2.7 转换距离(2)

 #include <iostream>
 using namespace  std;

 int main()
 {
     cout << "输入你的年龄\n";
     int age;
     cin >> age;
     cout <<  <<"ge月"<< endl;

     cin.get();
 }
     

2.7: 年龄(4)

 #include <iostream>
 using namespace  std;
 void c()
 {
     cout << "俺叫胡图图,家住翻斗花园\n俺叫胡图图,家住翻斗花园\n";

 }
 void cc()
 {
     cout << "那一夜的雨下的好大\n那一夜的雨下的好大\n";

 }

 int main()
 {
     c();
     cc();

     cin.get();
 }
     

2.7: 用3个函数输出2行语句(3)

 #include <iostream>
 using namespace  std;

 float 温度(int c)
 {
     return (c *= 1.8) + 32.0;

 }

 int main()
 {
     cout << "输入你的摄氏温度\n";
     int a;
     cin >> a;
     cout << "当前温度:" << 温度(a) << endl;

     cin.get();
 }
     

2.7 温度(5)

c++primer练习题的更多相关文章

  1. C++ Primer练习题day2

    /* 1.7略 1.8 /* 指出不合法的语句: std::cout<<"/"; std::cout<<"*/ "; std::cout ...

  2. C++ Primer练习题day1

    /* 练习1.1略 练习1.2.改写程序,让他返回-1. 练习1.3.编写程序,在标准的输出上打印Hello,World. */ #include<iostream> int main() ...

  3. C/C++:多个.cpp文件包括同一个.h头文件定义方法

    本文解决multiple definition of `XX'的错误.[出于反爬虫的目的,你不是在http://blog.csdn.net/zhanh1218上看到的,肯定不是最新最全的.] 关于头文 ...

  4. C++PRIMER第五版练习题答案第一章

    C++PRIMER第五版练习题答案第一章 应该有很多小伙伴和我一样,闲来无事买了本C++的书自己啃,课后的练习题做的很揪心,这里我分享下我写的答案,希望能帮助到你,提供源码,就不跑了哈,毕竟现在是第一 ...

  5. C primer plus 练习题 第七章

    1. #include <stdio.h> #define SPACE ' ' #define NEWLINE '\n' int main() { int spaces,newlines, ...

  6. C primer plus 练习题 第六章

    16. #include <stdio.h> int main() { double remain = 100.0; ; ) { remain = remain * 0.08 + rema ...

  7. C primer plus 练习题 第五章

    1. #include <stdio.h> #define MINU 60 int main() { int minute, hour, m; printf("请输入分钟:&qu ...

  8. C primer plus 练习题 第三章

    5. #include <stdio.h> int main() { float you_sec; printf("请输入你的年龄:"); scanf("%f ...

  9. C primer plus 练习题 第二章

    6. #include <stdio.h> void echo(); int main() { /* echo(); echo(); echo(); printf("\n&quo ...

随机推荐

  1. pillow 模块

    pillow模块 图片处理 中文文档 安装 pip install Pillow 对图片旋转90度显示 from PIL import Image im=Image.open("t.jpg& ...

  2. ESLint 使用指南

    ESLint 官方文档 About 页面分 About 和 Philosophy 两个部分对 ESLint 做了介绍,简洁明了,值得一读. 借助 ESLint,可将 静态代码分析 和 问题代码协助修复 ...

  3. P1522 牛的旅行

    P1522 牛的旅行 Cow Tours 提交 11.44k 通过 4.97k 时间限制 1.00s 内存限制 125.00MB 题目提供者洛谷 难度提高+/省选- 历史分数100 提交记录 查看题解 ...

  4. 大json直接序列化成dataset

    rtnDs= JsonConvert.DeserializeObject<DataSet>(strBuff);

  5. IDEA科学使用

    今天莫名激活码又用不起了有能力的支持正版吧 ,要用的时候又去网上到处找然后发现各种用不了,去淘宝又怕被骗博主就是过来人 ,总算下定决心写一篇一劳永逸的方法.. 方法一:合理使用激活码 用过idea的都 ...

  6. Bootstrap资料

    Bootstrap手册  : https://www.jqhtml.com/bootstraps-syntaxhigh/index.html 中文文档 :https://v3.bootcss.com/ ...

  7. python接口自动化-requests-toolbelt处理multipart/form-data

    1.requests-toolbelt官方文档:https://pypi.org/project/requests-toolbelt/ 2.环境安装 pip install requests-tool ...

  8. 视频中“5s后可跳过广告” 设计目的

    来源:https://wen.woshipm.com/question/detail/0quoes.html 1.保证你在看.用户关掉广告这5秒内,他的眼睛会盯着屏幕,因为他知道5秒之后就能跳过广告. ...

  9. yum装包报错

    [root@iZ6wefn2kl6064uuaxuwetZ ~]# yum –y install  gcc  pcre-devel zlib-devel openssl-develLoaded plu ...

  10. springboot项目集成activity

    1.按照上一篇博客,新建好springboot项目后,在项目pom.xml文件中添加activity依赖 <dependency> <groupId>org.activiti& ...