View Code of Problem 86

#include <stdio.h>
#include <string.h>
#include <math.h>

int main()
{
	int a,n,i,num;
	scanf("%d%d",&a,&n);
	int sum=a;
	num=a;
	for(i=1;i<n;i++)
	{
		num=num*10+a;
		sum=sum+num;
	}
	printf("%d",sum);
	return 0;
}

Double click to view unformatted code.


Back to problem 86