#include<stdio.h> void main() { int a,i,n,s,t; s=0;t=0; printf("please input a and n\n"); scanf("%d %d",&a,&n); printf("a=%d n=%d\n",a,n); for(i=1;i<=n;i++) { t=t+a; s=s+t; a=a*10; } printf("a+aa+aaa...=%d\n",s); }