View Code of Problem 86

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

Double click to view unformatted code.


Back to problem 86