iOS位数不足,前面补零 2018-03-09 本文已影响504人 学学学q OC/C 中格式输出数字,位数不足前面补0 1. int a = 4; printf("%03d",a); 2. int a = 4; int n = 3; printf("%0*d",n,a);