View Code of Problem 86

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

Double click to view unformatted code.


Back to problem 86