第1个回答 2014-10-25
#include <stdio.h>
int main()
{
int a[100]={},m,n;
printf("Please input the n:");
scanf("%d",&n);
printf("Please input the m:");
scanf("%d",&m);
int i,j;
for(i=0,j=1;i<n;i++,j*=10)
a[i]=(m/j)%10;
for(i=0;i<n;i++)
printf("%d",a[i]);
printf("\n");
return 0;
}本回答被网友采纳