View Code of Problem 86

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

Double click to view unformatted code.


Back to problem 86