可以考虑用数组来保存这些数,如:num()={"1","23","456","7890"}然后用循环输出数组元素的值就行,输出时用vbcrlf换行.
#include void main(){ int i, j, n = 1; for(i = 1; i <= 4; i++) { for(j = 1; j <= i; j++, n++) { printf("%d", n); } printf("\n"); }}