View Code of Problem 86

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

Double click to view unformatted code.


Back to problem 86