1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <stdio.h> #include <stdlib.h> int main(void) { int a,b,c; b=8; c=0; scanf("%d",&a); while(a>0 && a>=8) { c+=a/b; a%=b; printf("%d",c); } if(a<8) printf("%d",a); system("pause"); return 0; }