当前位置: 首页 > news >正文

编程 朋友 做网站优化seo技术

编程 朋友 做网站,优化seo技术,天津网站推广优化,2018做网站 工具答案仅供参考&#xff0c;实际运行效果取决于运行平台和运行软件 1.编写一个C程序&#xff0c;它显示您的姓名和地址。 #include <iostream> using namespace std;int main() {cout << "My name is sakuraaa0908 C Primer Plus." << endl;cout &…

答案仅供参考,实际运行效果取决于运行平台和运行软件

1.编写一个C++程序,它显示您的姓名和地址。

#include <iostream>
using namespace std;int main()
{cout << "My name is sakuraaa0908 C++ Primer Plus." << endl;cout << "My address is in library." << endl;return 0;
}

2.编写一个C程序它要求用户输入一个以 long 为单位的距离,然后将它转换为码(- ng等于220码)

#include <iostream>
using namespace std;int main()
{double long_distance;cout << "Enter a distance for long unit: ";cin >> long_distance;cout << long_distance << " long distance ";cout << "is equal to ";long_distance *= 220.0;cout << long_distance << " yard distance." << endl;return 0;
}

3.编写1个C++程序它使用3个用户定义的函数(括mai()),并生成下面的输出Three blind miceThree blind miceSee-how they runSeehow they run
其中一个函数要调用两次,该函数生成前两行:另一-个函数也被调用两次,并生成其余的输出。

#include <iostream>
using namespace std;void show_mice();
void show_running();int main()
{show_mice();show_mice();show_running();show_running();return 0;
}void show_mice()
{cout << "Three blind mice" << endl;
}void show_running()
{cout << "See how they run" << endl;
}

4.编写一个程序,让用户输入其年龄,然后显示该年龄包含多少个月,

如下所示:Enter your age: 29

#include <iostream>
using namespace std;int main()
{int age_total_months;cout << "Enter your age: ";cin >> age_total_months;cout << "Your age includes " << age_total_months * 12 << " months." << endl;return 0;
}

5.编写一个程序,其中的 main)调用一个用户定义的函数-以摄氏温度为参数,并返回相应的华氏温度值)。该程序按下面的格式要求用户输入摄氏温度值,并显示结果:
Please enter a Celsius value!20
20 degrees Celsius is 68-degrees Fahrenheit
下面是转换公式:华氏温度=1.8X摄氏温度+32.0

#include <iostream>
using namespace std;double temperature(double temp);int main()
{double celsius;cout << "Please enter a Celsius value: ";cin >> celsius;cout << celsius << " degrees Celsius is ";cout << temperature(celsius);cout << " degrees Fahrenheit." << endl;return 0;
}double temperature(double temp)
{return 1.8 * temp + 32.0;
}

6.编写一个程序其 main)调用一个用户定义的函数(以光年值为参数,并返回对应天文单位的值)。该程序按下面的格式要求用户输入光年值,并显示结果:
Enter the number of light years: 4.2
4.2 1ight years = 265608 astronomical units .
天文单位是从地球到太阳的平均距离(约 150000000 公里或93000000 英里光年是光一年走的距离(约10万亿公里或6万亿英里)(除太阳外,最近的大约离地球 4.2光年)。

请使用 double 类型(参见程序清单2.4),转换公式为:
1光年-63240 天文单位

#include <iostream>
using namespace std;double transform(double temp);int main()
{double light_years;cout << "Enter the number of light years: ";cin >> light_years;cout << light_years << " light years = ";cout << transform(light_years);cout << " astronomical units." << endl;return 0;
}double transform(double temp)
{return temp * 63240.0;
}

7,编写一个程序,要求用户输入小时数和分钟数。在 main()函数中,将这两个值传递给一个 void雨数,后者以下面这样的格式显示这两个值:
Enter the number of hours: 9
Enter the number of minutes: 28
Time:9:28

#include <iostream>
using namespace std;void show_time(int hour, int minute);int main()
{int hour, minute;cout << "Enter the number of hours: ";cin >> hour;cout << "Enter the number of minutes: ";cin >> minute;show_time(hour, minute);return 0;
}void show_time(int hour, int minute)
{cout << "Time: " << hour << ":" << minute << endl;
}
http://www.yayakq.cn/news/748085/

相关文章:

  • 公司网站包含哪些内容网上开店电商平台有哪些
  • 没有公司个人可以做网站卖东西吗快速优化网站排名搜索
  • 做网站公司 陕西渭南建设银行企业网银网站打不开
  • ipv6改造 网站怎么做禄丰网站建设
  • 上传的网站打不开 index.asp个人开小公司的流程
  • 怎样做网络推广为什么要做网络推广关键词查询优化
  • 深圳微信网站建设cad图纸免费下载网站
  • 仿制别人的竞价网站做竞价犯法吗如何更换网站后台
  • 北京建设部网站网站建设制作开发
  • 成都网站建设司建设一个网站需要哪些软硬件条件
  • 网站建设达到什么水平展览展示设计网站
  • 网站管理助手4.0 mysql株洲制作网站
  • 如何撰写网站建设方案小说网站个人可以做吗
  • 网站淘宝推广怎么做富海人才招聘网官网
  • 外贸出口网站建设电商运营是干嘛的
  • 全屏产品网站宽屏大气网站源码
  • 如何查看网站有没有收录共青城网站建设公司
  • APP客户端网站建设wordpress 文章标题列表
  • 企业品牌类网站大学学科建设网站
  • 海西高端网站建设价格浦东新区网站优化推广
  • wordpress 菜单栏阜阳网站优化
  • 中国纪检监察报记者电话资源企业网站排名优化价格
  • wordpress 企业网站模板国内企业网站设计公司
  • 延边延吉网站建设提升wordpress速度
  • 建设小说网站小说源浙江坤宇建设有限公司网站
  • 360怎么变成建设银行首选网站在本地搭建wordpress
  • 做外贸做网站网站手机模板源码下载
  • 国外免费网站域名服务器入口挺好的网页链接
  • 如何建设网站兴田德润怎么联系建设公司logo
  • 企业建设网站的比例中信建设有限责任公司集采