当前位置:网站首页>%f格式符
%f格式符
2022-07-04 13:32:00 【Zaltana】
输入一个实数,第一次按实型输出;第二次保留2位小数输出;第三次保留3位小数但最小列宽8列输出,空格分隔。
格式
输入格式:输入实型
输出格式:输出实型,空格分隔。
样例
输入: 31331.14345435
输出: 31331.143454 31331.14 31331.143
#include<bits/stdc++.h>
using namespace std;
int main( )
{
double n;
scanf("%lf", &n);
printf("%lf %.2lf %8.3lf" ,n,n,n);
return 0;
}
边栏推荐
- Industrial Internet has greater development potential and more industry scenarios
- Ultrasonic distance meter based on 51 single chip microcomputer
- EventBridge 在 SaaS 企业集成领域的探索与实践
- 内存管理总结
- Programmers exposed that they took private jobs: they took more than 30 orders in 10 months, with a net income of 400000
- The performance of major mainstream programming languages is PK, and the results are unexpected
- [information retrieval] experiment of classification and clustering
- Explain of SQL optimization
- When synchronized encounters this thing, there is a big hole, pay attention!
- Techsmith Camtasia Studio 2022.0.2屏幕录制软件
猜你喜欢

Flutter reports an error no mediaquery widget ancestor found

Gin integrated Alipay payment

Detailed explanation of visual studio debugging methods

Stm32f1 and stm32subeide programming example -max7219 drives 8-bit 7-segment nixie tube (based on GPIO)
![leetcode:6110. The number of incremental paths in the grid graph [DFS + cache]](/img/48/56ed03b21709a97fd55c8cccf98092.png)
leetcode:6110. The number of incremental paths in the grid graph [DFS + cache]

Kubernets pod exists finalizers are always in terminating state

How to handle exceptions in multithreading?

金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~

Redis 发布和订阅

Transplant tinyplay for imx6q development board QT system
随机推荐
产品好不好,谁说了算?Sonar提出分析的性能指标,帮助您轻松判断产品性能及表现
C language course design questions
Yyds dry goods inventory # solve the real problem of famous enterprises: continuous maximum sum
Docker compose public network deployment redis sentinel mode
都在说DevOps,你真正了解它吗?
5G电视难成竞争优势,视频资源成中国广电最后武器
PLC Analog input analog conversion FC s_ ITR (CoDeSys platform)
SAIC Maxus officially released its new brand "mifa", and its flagship product mifa 9 was officially unveiled!
openresty 限流
Expose Ali's salary and position level
Ffprobe common commands
毕业季-个人总结
关于FPGA底层资源的细节问题
[C language] Pointer written test questions
Openresty current limiting
Five minutes of machine learning every day: why do we need to normalize the characteristics of numerical types?
如何配和弦
对话龙智高级咨询顾问、Atlassian认证专家叶燕秀:Atlassian产品进入后Server时代,中国用户应当何去何从?
Ali was laid off employees, looking for a job n day, headhunters came bad news
LVGL 8.2 Line wrap, recoloring and scrolling