View Code of Problem 86

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

Double click to view unformatted code.


Back to problem 86