[求助]:a+aa+...+aa....
main(){int a,n,count=1;
long int sn=0,tn=0;
printf("please input a and n");
scanf("%d,%d",&a,&n);
printf("a=%d,n=%d\n",a,n);
while(count<=n)
{tn=tn+a;
sn=sn+tn;
a=a*10;
++count;}
printf("a+aa+...=%ld\n",sn);}
请各位高手看看,为什麽a=3 n=10或者a与n再大点就不对了