C语言基础:格式化整数输出
#include <stdio.h> int main () { int value = 5; printf ("%1d\n", value); printf ("%2d\n", value); printf ("%3d\n", value); printf ("%4d\n", value); return 1; }
gcc编译输出
5 5 5 5
C语言基础:格式化整数输出
#include <stdio.h> int main () { int value = 5; printf ("%1d\n", value); printf ("%2d\n", value); printf ("%3d\n", value); printf ("%4d\n", value); return 1; }
gcc编译输出
5 5 5 5