四楼是对的,他说的是scanf输入函数,而楼主说的是printf输出函数。
努力—前进—变老—退休—入土
#include<stdio.h> int main(void) { printf("%*da\n",0,1234); printf("%*db\n",5,1234); printf("%*dc\n",10,1234); printf("%*dd\n",20,1234); printf("%-*de\n",0,1234); printf("%-*df\n",5,1234); printf("%-*dg\n",10,1234); printf("%-*dh\n",20,1234); return 0; }