View Code of Problem 86

#include<stdio.h>

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

Double click to view unformatted code.


Back to problem 86