View Code of Problem 86

#include<stdio.h>
int main()
{
	int a,n;
  	int sum=0,k;
  	scanf("%d %d",&a,&n);
  	k=a;
  	while(n--)
        {
        	sum=sum+k;
          	k=k*10+a;
        }
  	printf("%d\n",sum);
  	return 0;
}

Double click to view unformatted code.


Back to problem 86