当前位置:网站首页>[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);

边栏推荐
- 十大劵商如何开户?另外,手机开户安全么?
- Five combination boxing, solving six difficult problems on campus and escorting the construction of educational informatization
- Latex formula code
- 【批处理DOS-CMD-汇总】扩展变量-延迟变量cmd /v:on、cmd /v:off、setlocal enabledelayedexpansion、DisableDelayedExpansion
- Thesis learning -- Analysis and Research on similarity query of hydrological time series
- Android screen adaptation (using constraintlayout), kotlin array sorting
- ContentType所有类型对比
- Gdip - hatchbrush pattern table
- [website architecture] solve 90% of distributed transactions in one move, and introduce the working principles and application scenarios of database transactions and distributed transactions
- Saving db4i depth camera pictures with MATLAB
猜你喜欢

QT -- 1. QT connection database

【入门】提取不重复的整数

2022 test question bank and simulation test of tea master (primary) operation certificate

What information does the supplier need to know about Audi EDI project?
![[batch DOS CMD summary] extension variables - delay variables CMD /v:on, CMD /v:off, SETLOCAL enabledelayedexpansion, disabledelayedexpansion](/img/ce/6c9e4f2c54710610e8b1f68d6d8088.png)
[batch DOS CMD summary] extension variables - delay variables CMD /v:on, CMD /v:off, SETLOCAL enabledelayedexpansion, disabledelayedexpansion

软件测试方法和技术 - 基础知识概括

Lm08 mesh series mesh inversion (fine)

PostgreSQL source code learning (26) -- windows vscode remote debugging PostgreSQL on Linux

AUTOSAR learning record (1) – ECUM_ Init

Wang Yingqi, founder of ones, talks to fortune (Chinese version): is there any excellent software in China?
随机推荐
Eigen matrix operation Library
她就是那个「别人家的HR」|ONES 人物
【入门】截取字符串
SQL number injection and character injection
Deep learning systematic learning
AArdio - 【问题】bass库回调时内存增长的问题
[MySQL learning notes27] stored procedure
[MySQL learning notes 28] storage function
Thesis learning -- Analysis and Research on similarity query of hydrological time series
2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation
The H5 page has set the font thickness style, but the wechat access style in Huawei mobile phone doesn't take effect?
[software] phantomjs screenshot
Android screen adaptation (using constraintlayout), kotlin array sorting
【力扣10天SQL入门】Day9 控制流
ONES 创始人王颖奇对话《财富》(中文版):中国有没有优秀的软件?
2022 operation of refrigeration and air conditioning equipment operation of national question bank simulated examination platform
[batch DOS CMD summary] extension variables - delay variables CMD /v:on, CMD /v:off, SETLOCAL enabledelayedexpansion, disabledelayedexpansion
Minecraft 1.16.5模组开发(五十一) 方块实体 (Tile Entity)
STM32 uses esp01s to go to the cloud, mqtt FX debugging
Access report realizes subtotal function