使用边宽度的输出字段

#include

void main()

{

    unsigned width , precision;

    int number = 256 ;

    double weigth = 243.5;

    printf("what field width \n");

    scanf("%d",&width);

    printf("the num ber is : %*d:\n",width,number);

    printf("now enter a width and a precision \n");

    scanf("%d %d",&width,&precision);

    printf("weight = %*.*f\n",width,precision,weigth);



}

你可能感兴趣的:(使用边宽度的输出字段)