#include<stdio.h>
int main()
{
int i = 5, j = 4;
printf("%0*d ", i, j);
printf("%-10d ", j);
return 0;
int main()
{
int i = 5, j = 4;
printf("%0*d ", i, j);
printf("%-10d ", j);
return 0;
}
执行结果:
00004
4