当前位置:网站首页>%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;
}
边栏推荐
- 现代控制理论入门+理解
- 内存管理总结
- Leetcode 1200 minimum absolute difference [sort] the way of leetcode in heroding
- Industrial Internet has greater development potential and more industry scenarios
- A keepalived high availability accident made me learn it again
- Programmer turns direction
- [local differential privacy and random response code implementation] differential privacy code implementation series (13)
- openresty 限流
- Expose Ali's salary and position level
- Scratch Castle Adventure Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
猜你喜欢
内存管理总结
Combined with case: the usage of the lowest API (processfunction) in Flink framework
[MySQL from introduction to proficiency] [advanced chapter] (IV) MySQL permission management and control
IO流:节点流和处理流详细归纳。
近一亿美元失窃,Horizon跨链桥被攻击事件分析
Redis publish and subscribe
How to build a technical team that will bring down the company?
如何配和弦
Cann operator: using iterators to efficiently realize tensor data cutting and blocking processing
Digi XBee 3 rf: 4 protocols, 3 packages, 10 major functions
随机推荐
Kubernets pod exists finalizers are always in terminating state
Ffmpeg Visual Studio development (IV): audio decoding
Halo effect - who says that those with light on their heads are heroes
C language personal address book management system
IO流:节点流和处理流详细归纳。
C language book rental management system
[information retrieval] link analysis
信号处理之一阶RC低通滤波器宏指令实现(繁易触摸屏)
Comment configurer un accord
How to handle exceptions in multithreading?
如何配和弦
Redis publier et s'abonner
They are all talking about Devops. Do you really understand it?
LVLG 8.2 circular scrolling animation of a label
LVGL 8.2 Menu
On the implementation plan of MySQL explain
LVGL 8.2 Sorting a List using up and down buttons
Explain of SQL optimization
Ranking list of databases in July: mongodb and Oracle scores fell the most
How to match chords