当前位置:网站首页>[code hoof set novice village question 600] align left and right when outputting
[code hoof set novice village question 600] align left and right when outputting
2022-07-19 13:38:00 【Sandm *】
Topic link :
Their thinking :
Here we use %nd For example ,
- The so-called left alignment , namely %-nd,
That is, multiple lines of different The numbers are aligned to the left at the same time , The number alignment between lines is realized by spaces
- Right alignment , namely %nd
That is, multiple lines of different numbers are aligned based on the rightmost
Be careful :
Among them %nd And %m.nf
The width and precision in must be constant , It can't be a variable
Reference code :
#include<bits/stdc++.h>
using namespace std;
int main( )
{
double a = 3.141593,b = 22.345600;
printf("%-14lf %14lf\n",a,a);// Don't forget it's %lf No %d
printf("%-14lf %14lf",b,b);
return 0;
}边栏推荐
- [record of question brushing] 13 Roman numeral to integer
- Onvif protocol related: 4.1.2 WS username token method to obtain token
- Onvif protocol related: 3.1.1 digest access authorization
- Design and Simulation of anti reverse connection circuit based on MOS transistor
- Security measures for tcp/ip protocol vulnerabilities
- ONVIF Protocol Related: 4.1.3 WS - username token Method get capture d'écran URL
- onvif协议相关:常用类说明
- 每周小结(*65):有计划的输出
- Template virtual machine environment preparation
- Transphorm's surface mount packaging product series adds industry standard to-263 (D2Pak) packaging products to expand the advantages of supergan platform
猜你喜欢

Panasonic A6 servo driver external absolute value grating ruler full closed loop parameter setting
![[error record /selectpicker] the display position of dropdown menu is offset](/img/92/78787b33b941f09d753f0f747f8c72.png)
[error record /selectpicker] the display position of dropdown menu is offset

忘掉Postman,Apifox更好用

torch.utils.data.DataLoader说明

Simulation of overvoltage protection (OVP) circuit based on PMOS

语音通信网络的原理

How to upgrade Flink job gracefully?

ONVIF Protocol Related: 4.1.3 WS - username token Method get capture d'écran URL

Galaxy Kirin V10 arm offline installation of portal

Array simulation queue
随机推荐
Onvif protocol related: 4.1.1 WS username token method to obtain wsusernametokenbean
大家好,问一下数据库没开始binlog如何实时同步么,有没有好的方案
Use golang to correctly process the IP data of the five major Internet registration agencies
ArrayList underlying analysis
[micro Service ~ advanced] configuration center practice
AcWing第 60 场周赛
Onvif protocol related: 3.1.2 get the token list in digest mode
2.三数之和
Codeforces Round #808 (Div. 2)ABCD
A general memory management driver code is sorted out
mysql排序索引失效?
Transphorm的表面贴装封装产品系列增加行业标准TO-263 (D2PAK)封装产品,扩大SuperGaN平台的优势
onvif协议相关:3.1.3 Digest方式获取截图url
El table column drag and drop (no need to introduce other plug-ins)
LeetCode 0118. Yanghui triangle
JVM self study summary
onvif协议相关:2.1.3 none方式获取流地址
鸿蒙设备开发快速入门之Helloword与LED——华为云14天鸿蒙设备开发实战学习笔记 第二篇
Elastic load balancing automatically distributes the access traffic to multiple cloud servers, expands the external service capacity of the application system, and improves the security of the applica
Advanced C language -- character function and string function