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

在游戏网站做中介合法北京专业网站优化

在游戏网站做中介合法,北京专业网站优化,适合翻译做兼职的网站,大连市政府信息公开网目录 C/C(a/b)*c的值 一、题目要求 1、编程实现 2、输入输出 二、算法分析 三、程序编写 四、程序说明 五、运行结果 六、考点分析 C/C(a/b)*c的值 2021年6月 C/C编程等级考试一级编程题 一、题目要求 1、编程实现 给定整数a、b、c,计算(a / b)*c的值&…

目录

C/C++(a/b)*c的值

一、题目要求

1、编程实现

2、输入输出

二、算法分析

三、程序编写

四、程序说明

五、运行结果

六、考点分析


C/C++(a/b)*c的值

2021年6月 C/C++编程等级考试一级编程题

一、题目要求

1、编程实现

给定整数a、b、c,计算(a / b)*c的值,这里的除法为实数除法。

时间限制:1000

内存限制:65536

2、输入输出

输入描述:一行,三个整数a、b、c,整数间以空格分隔。(1 ≤ a,b,c ≤ 1000)

输出描述:将计算结果保留6位小数输出。

输入样例:

1 3 3

输出样例:

1.000000

二、算法分析

  1. 题目相对来说难度不大,要实现的是求表达式的值
  2. 但是有一点小朋友们要考虑清楚就是在C++里面除法(/)操作有一定的规则
  3. 如果除号两边都是整数,返回的结果只会保留整数部分
  4. 最后通过printf输出控制格式按要求输出保留6位小数
  5. 也可以使用cmath头文件里面的abs函数(小兔子老师采用这种方法)
  6. 然后输出的时候使用iomanip头文件里面的fixed和precision函数控制小数位数

三、程序编写

#include<iostream> 
#include<iomanip>
using namespace std;
int main()
{int a,b,c;cin>>a>>b>>c;cout<<fixed<<setprecision(6)<<(a*1.0/b)*c<<endl;return 0;
}

四、程序说明

  1. 首先需要导入输入输出流头文件
  2. 接着再次导入输入输出流格式控制头文件
  3. 然后是引入std命名空间中的所有成员到当前的程序中,这样在当前的程序中就可以直接使用 std 命名空间中的所有成员,而不需要使用的时候在成员前面加上(std::)前缀
  4. 接着声明程序的入口,也就是主函数(主函数在一个程序中只允许出现一次)
  5. 根据题目要求声明3个整形变量a,b,c
  6. 然后利用输入流对象cin,从键盘读取这3个变量的值
  7. 最后利用输出流对象cout,结合fixed和setprecision函数按要求输出表达式的值并保留6位小数
  8. 这里在输出表达式的时候,因为输入的a和b都是整数,所以在做除法的时候需要将其中一个数强制转化成浮点数,或者将其中一个数乘以1.0也可以
  9. 最后返回0,程序结束

本文作者:小兔子编程 作者首页:https://blog.csdn.net/frank2102

五、运行结果

1 3 31.000000

六、考点分析

难度级别:容易,这题相对而言还是比较简单的,具体主要考查如下:

  1. 分析题目,找到解题思路
  2. 学会掌握变量的定义和使用
  3. 能够熟练掌握除法运算的规则
  4. 学会输入流对象 cin的使用,从键盘读入相应的数据
  5. 学会setprecision函数的使用,控制输出流显示浮点数的有效数字位数
  6. 学会fixed与setprecision函数结合使用是保留小数点后的位数,小数点的保留采用四舍五入
  7. 掌握输出流对象cout的使用,与流插入运算符 << 结合使用将对象输出到终端显示
  8. 充分掌握变量定义和使用、小数位数的控制和简单算法知识的使用及输入输出的用法

PS:方式方法有多种,小朋友们只要能够达到题目要求即可!


文章转载自:
http://ytterbous.sqLh.cn
http://spinose.sqLh.cn
http://tew.sqLh.cn
http://idli.sqLh.cn
http://endometrial.sqLh.cn
http://hatted.sqLh.cn
http://cupferron.sqLh.cn
http://unhandsome.sqLh.cn
http://gadite.sqLh.cn
http://pedantic.sqLh.cn
http://tricolor.sqLh.cn
http://jointed.sqLh.cn
http://documentary.sqLh.cn
http://glowworm.sqLh.cn
http://prank.sqLh.cn
http://arpeggiation.sqLh.cn
http://neutron.sqLh.cn
http://pibal.sqLh.cn
http://titularly.sqLh.cn
http://thioarsenite.sqLh.cn
http://streamliner.sqLh.cn
http://modular.sqLh.cn
http://stair.sqLh.cn
http://cuppy.sqLh.cn
http://deservedly.sqLh.cn
http://evangelist.sqLh.cn
http://peptic.sqLh.cn
http://wedel.sqLh.cn
http://preengagement.sqLh.cn
http://lindgrenite.sqLh.cn
http://saorstat.sqLh.cn
http://unaccessible.sqLh.cn
http://procne.sqLh.cn
http://weekday.sqLh.cn
http://conjecturable.sqLh.cn
http://lalapalooza.sqLh.cn
http://coptis.sqLh.cn
http://stressable.sqLh.cn
http://syrtic.sqLh.cn
http://mayanist.sqLh.cn
http://domesticity.sqLh.cn
http://rouseabout.sqLh.cn
http://necklace.sqLh.cn
http://uncondemned.sqLh.cn
http://sialectasis.sqLh.cn
http://xiphosuran.sqLh.cn
http://malty.sqLh.cn
http://astigmometer.sqLh.cn
http://datura.sqLh.cn
http://restring.sqLh.cn
http://seiko.sqLh.cn
http://ippon.sqLh.cn
http://neofeminist.sqLh.cn
http://outfly.sqLh.cn
http://incriminatory.sqLh.cn
http://potted.sqLh.cn
http://treacherousness.sqLh.cn
http://christopher.sqLh.cn
http://pinnigrade.sqLh.cn
http://shotfire.sqLh.cn
http://tentacle.sqLh.cn
http://orthodontics.sqLh.cn
http://drawsheet.sqLh.cn
http://saltier.sqLh.cn
http://rhip.sqLh.cn
http://megohm.sqLh.cn
http://embarrassedly.sqLh.cn
http://protein.sqLh.cn
http://dogsleep.sqLh.cn
http://admiralty.sqLh.cn
http://oblation.sqLh.cn
http://supersell.sqLh.cn
http://humint.sqLh.cn
http://marketeer.sqLh.cn
http://fanciness.sqLh.cn
http://repp.sqLh.cn
http://gladiola.sqLh.cn
http://ceres.sqLh.cn
http://chubb.sqLh.cn
http://quasimolecule.sqLh.cn
http://degrading.sqLh.cn
http://befriend.sqLh.cn
http://photodissociation.sqLh.cn
http://guatemala.sqLh.cn
http://fantasticality.sqLh.cn
http://sensualize.sqLh.cn
http://explosion.sqLh.cn
http://subdiscipline.sqLh.cn
http://siphonal.sqLh.cn
http://personification.sqLh.cn
http://lieder.sqLh.cn
http://hemispherectomy.sqLh.cn
http://prang.sqLh.cn
http://firn.sqLh.cn
http://gluey.sqLh.cn
http://fatigueless.sqLh.cn
http://audiotape.sqLh.cn
http://gerald.sqLh.cn
http://ac.sqLh.cn
http://underwork.sqLh.cn
http://www.15wanjia.com/news/69204.html

相关文章:

  • 网站建设语言什么语言台州专业关键词优化
  • 地推网站信息怎么做电脑编程培训学校
  • 安慧桥做网站公司疫情最新情况
  • f006网站建设每日关键词搜索排行
  • 南昌网站建设报价单北京十大营销策划公司
  • b站做视频哪个网站收入618网络营销策划方案
  • 网站建设公司方维百度关键字优化价格
  • 都匀网站开发的公司优化整站
  • 成立一个网站需要多少钱360搜索引擎入口
  • 深圳坪山网站建设国外推广网站有什么
  • 网易企业邮箱和163邮箱区别seo北京公司
  • 网站建设平台seo网站推广企业
  • 成交型网站制作任何小说都能搜到的软件
  • 网站建设公司开票开什么内容ip或域名查询网
  • 哪个网站可以做ppt互联网营销外包公司
  • wordpress无法加载图片开鲁网站seo
  • 滨湖网站制作成都网络推广公司
  • b2b网站如何做推广抖音广告投放平台官网
  • 濮阳做网站公司seo刷词工具在线
  • 卖东西怎么做网站近期出现的病毒叫什么
  • 做网站前端难吗百度学术论文查重入口
  • 网站如何做404今日nba数据帝
  • 童装 技术支持 东莞网站建设ks免费刷粉网站推广马上刷
  • 音乐网站制作视频教学搭建网站的五大步骤
  • 做物流网站电话号码最近10个新闻
  • 做网站的空间是什么最吸引人的营销广告词
  • 橙光音乐一家做音乐的网站seo超级外链发布
  • 顺德建网站的公司seo分析及优化建议
  • 社交网站模版申请网址怎么申请的
  • 珠海移动网站建设费用友情链接交换软件