阅读背景:

c语言printf的左对齐和右对齐_cosmos2015的博客_左对齐c语言

来源:互联网 
#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("%10dOK\n", 8888);    //右对齐。数字宽度为10,若不足10,在左边补足空格
    printf("%-10dOK\n", 8888);   //左对齐。数字宽度为10,若不足10,在右边补足空格
    return 0;
}
#include <stdio.h>
#include <stdlib.h>

int mai



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: