#include <stdio.h>
int a,b,c; //a dividendo e b divisore (base)
int main() {
scanf("%d", &a);
scanf("%d", &b);
if(a==0) {
printf("0");
}
while(a>0) {
c=0;
while(a>=b) {
a=a-b;
c=c+1;
}
printf("%d", a);
a=c;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: