右对齐%numd(num是位数,比如按5位数的长度输出,num为正数则右对齐) #include <stdio.h>intmain() { printf("第%3d个数:%5d\n",1,2); printf("第%3d个数:%5d\n",10,20); printf("第%3d个数:%5d\n",100,200);return0; } 左对齐%numd(num是位数,比如按5位数的长度输出,num为负数则左对齐...
在前面加_ 比如 printf("%_d\n",a)
你的意思是不是回车换行啊。如果用printf那就加个/n
右对齐%numd(num是位数,比如按5位数的长度输出,num为正数则右对齐) #include <stdio.h>intmain() { printf("第%3d个数:%5d\n",1,2); printf("第%3d个数:%5d\n",10,20); printf("第%3d个数:%5d\n",100,200);return0; } 左对齐%numd(num是位数,比如按5位数的长度输出,num为负数则左对齐...
C语言如何使输出的数字对齐 C语⾔如何使输出的数字对齐右对齐%num d(num是位数,⽐如按5位数的长度输出,num为正数则右对齐)#include <stdio.h> int main(){ printf("第%3d个数:%5d\n", 1, 2);printf("第%3d个数:%5d\n", 10, 20);printf("第%3d个数:%5d\n", 100, 200);return0;} ...
C语言如何使输出的数字对齐 2019-10-08 09:48 −... 早安帆 0 8287 ArrayList实现原理(JDK1.8) 2019-11-30 19:14 −### ArrayList实现原理(JDK1.8) ![](https://img2018.cnblogs.com/blog/1669484/201911/1669484-20191130191338574-578470422.png) ``` java public class ArrayLis... ...
C语言如何使输出的数字对齐 2019-10-08 09:48 −... 早安帆 0 8294 ArrayList实现原理(JDK1.8) 2019-11-30 19:14 −### ArrayList实现原理(JDK1.8) ![](https://img2018.cnblogs.com/blog/1669484/201911/1669484-20191130191338574-578470422.png) ``` java public class ArrayLis... ...
右对齐%numd(num是位数,比如按5位数的长度输出,num为正数则右对齐) #include <stdio.h>intmain() { printf("第%3d个数:%5d\n",1,2); printf("第%3d个数:%5d\n",10,20); printf("第%3d个数:%5d\n",100,200);return0; } 左对齐%numd(num是位数,比如按5位数的长度输出,num为负数则左对齐...