View Code of Problem 86

#include<stdio.h>
int main()
{
  int a,n,i,sum,c;
  scanf("%d %d",&a,&n);
  sum=a;c=a;
  for(i=1;i<n;i++)
  { 
    a=a*10+c;
    sum=sum+a;
  }
  printf("%d\n",sum);
}

Double click to view unformatted code.


Back to problem 86