#include <math.h> int maxval = 1000; int width = round(1+log(maxval)/log(10)); ... printf("%*d\n", width, intval);.
確定! 回上一頁