当前位置:网站首页>[introduction] approximate value
[introduction] approximate value
2022-07-01 07:59:00 【-Heaven rewards diligence-】
describe
Write a program , Accept a positive floating point number , Output the approximate integer value of this value . If the value after the decimal point is greater than or equal to 0.5 , Rounding up ; Less than 0.5 , Then round down .
Data range : Make sure that the number entered is in 32 Bit floating point number range
Input description
Enter a positive floating point number
Output description
Output the approximate integer value of this value
Example 1
Input :5.5
Output :6
explain :0.5>=0.5, therefore 5.5 Need to round up to 6
Example 2
Input :2.499
Output :2
explain :0.499<0.5,2.499 Round down to 2
<?php
fscanf(STDIN, "%f", $a);
echo round($a,0);

边栏推荐
- Aardio - 阴影渐变文字
- 她就是那个「别人家的HR」|ONES 人物
- Day5: scanner object, next() and nextline(), sequential structure, selection structure, circular structure
- [MySQL learning notes27] stored procedure
- IMDB practice of emotion classification (simplernn, LSTM, Gru)
- Rk3399 platform development series explanation (network debugging) 7.30. What will affect the sending process of TCP packets?
- 奥迪AUDI EDI 项目中供应商需要了解哪些信息?
- SQL number injection and character injection
- Gdip - hatchBrush图案表
- [skill] create Bat quick open web page
猜你喜欢

图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证

Thesis learning -- Analysis and Research on similarity query of hydrological time series

【网站架构】一招搞定90%的分布式事务,实打实介绍数据库事务、分布式事务的工作原理应用场景

Five combination boxing, solving six difficult problems on campus and escorting the construction of educational informatization

Discussion on several research hotspots of cvpr2022

Access报表实现小计功能

【入门】输入整型数组和排序标识,对其元素按照升序或降序进行排序

SharePoint - modify web application authentication using PowerShell

Office365 - how to use stream app to watch offline files at any time

2022 test question bank and simulation test of tea master (primary) operation certificate
随机推荐
getInputStream() has already been called for this request
How to use layui to display the data in the database in the form of tables
5大组合拳,解决校园6大难题,护航教育信息化建设
Aardio - 自己构造的getIconHandle的方法
[skill] create Bat quick open web page
php laravel微信支付
postgresql源码学习(26)—— Windows vscode远程调试Linux上的postgresql
Cyclic neural network
2022 tea master (intermediate) recurrent training question bank and answers
IMDB practice of emotion classification (simplernn, LSTM, Gru)
凸印的印刷原理及工艺介绍
力扣每日一题-第32天-1822.数组元素积的符号
[MySQL learning notes 25] SQL statement optimization
Gui Gui programming (XV) - use scale to control font size changes
Lm08 mesh series mesh inversion (fine)
Significance and measures of source code encryption
TCP/UDP 通信问题整理
漏刻有时API接口实战开发系列(14):身份证实名鉴权验证
Access报表实现小计功能
LSTM of RNN