当前位置:网站首页>%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;
}
边栏推荐
- 如何搭建一支搞垮公司的技术团队?
- Redis publier et s'abonner
- leecode学习笔记-约瑟夫问题
- LVGL 8.2 keyboard
- Halo effect - who says that those with light on their heads are heroes
- Kubernets Pod 存在 Finalizers 一直处于 Terminating 状态
- Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design
- LVLG 8.2 circular scrolling animation of a label
- 关于FPGA底层资源的细节问题
- Memory management summary
猜你喜欢
[information retrieval] link analysis
Test evaluation of software testing
LeetCode 1200 最小绝对差[排序] HERODING的LeetCode之路
Redis publish and subscribe
92. (cesium chapter) cesium building layering
LVGL 8.2 Line wrap, recoloring and scrolling
5G电视难成竞争优势,视频资源成中国广电最后武器
A keepalived high availability accident made me learn it again
Explain of SQL optimization
UFO:微软学者提出视觉语言表征学习的统一Transformer,在多个多模态任务上达到SOTA性能!...
随机推荐
Codeforce:c. sum of substrings
Sqlserver functions, creation and use of stored procedures
Redis 发布和订阅
Expose Ali's salary and position level
Details of FPGA underlying resources
Redis publish and subscribe
【C语言】指针笔试题
How to build a technical team that will bring down the company?
Transplant tinyplay for imx6q development board QT system
Five minutes of machine learning every day: why do we need to normalize the characteristics of numerical types?
Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
Programmer turns direction
韩国AI团队抄袭震动学界!1个导师带51个学生,还是抄袭惯犯
Exploration and practice of eventbridge in the field of SaaS enterprise integration
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
内存管理总结
Ali was laid off employees, looking for a job n day, headhunters came bad news
C language achievement management system for middle school students
Five minutes of machine learning every day: how to use matrix to represent the sample data of multiple characteristic variables?