程序代码:
#include <stdio.h>
//#include <stdlib.h>
char str[100];
int main(){
int a,n;
int i,j,t,len;
scanf("%d%d",&a,&n);
for(i = 0; i<n;i++){
t = a + i;
len = sprintf(str,"%d",t);
for(j = 0; j< i+1;j++)
printf("%c",str[j%len]);
printf("\n");
}
//system("pause");
return 0;
}