printf("%50s",str); //右对齐,左补空格,50是长度 printf("%-50s",str); //左对齐,右补空格,50是长度 printf("%02d",cnt); //右对齐,左补0,2是长度