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