当前位置:网站首页>%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;
}
边栏推荐
- Is it safe to open an account online for stock speculation? Will you be cheated.
- What are the concepts of union, intersection, difference and complement?
- Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering
- 10. (map data) offline terrain data processing (for cesium)
- Redis publish and subscribe
- [algorithm leetcode] interview question 04.03 Specific depth node linked list (Multilingual Implementation)
- 如何搭建一支搞垮公司的技术团队?
- How to handle exceptions in multithreading?
- LVGL 8.2 Sorting a List using up and down buttons
- 对话龙智高级咨询顾问、Atlassian认证专家叶燕秀:Atlassian产品进入后Server时代,中国用户应当何去何从?
猜你喜欢
How to build a technical team that will bring down the company?
UFO:微软学者提出视觉语言表征学习的统一Transformer,在多个多模态任务上达到SOTA性能!...
Helix Swarm中文包发布,Perforce进一步提升中国用户体验
内存管理总结
LVGL 8.2 Line wrap, recoloring and scrolling
Sqlserver functions, creation and use of stored procedures
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
flutter 报错 No MediaQuery widget ancestor found.
Introduction to asynchronous task capability of function calculation - task trigger de duplication
自动控制原理快速入门+理解
随机推荐
ES6 modularization
10. (map data) offline terrain data processing (for cesium)
es6模块化
leecode学习笔记-约瑟夫问题
如何搭建一支搞垮公司的技术团队?
Solutions to the problems of miui12.5 red rice k20pro using Au or povo2
Partial modification - progressive development
SAIC Maxus officially released its new brand "mifa", and its flagship product mifa 9 was officially unveiled!
[algorithm leetcode] interview question 04.03 Specific depth node linked list (Multilingual Implementation)
Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design
Respect others' behavior
Leetcode 1200 minimum absolute difference [sort] the way of leetcode in heroding
[information retrieval] link analysis
LVGL 8.2 Draw label with gradient color
LVGL 8.2 text shadow
Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering
03 storage system
Detailed explanation of visual studio debugging methods
Transplant tinyplay for imx6q development board QT system
Details of FPGA underlying resources