View Code of Problem 86

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

Double click to view unformatted code.


Back to problem 86