View Code of Problem 86

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

Double click to view unformatted code.


Back to problem 86