int main()
{ int a = 0, i = 0; int temp[5] = {0,0,0,0,0}; scanf("%d",&a); while(a) { temp[i++]=a%8; a=a/8; } for(i=4; i>=0; --i) printf("%d", temp[i]);
#include <stdio.h>
int main (void)
{ int num; printf("please input a number 0 and 32767:"); scanf("%d",&num); printf("in octal,your number is %5o.\n",num); return 0;
}
#include
int main (void)
{ int num; printf("please input a number 0 and 32767:"); scanf("%d",&num); printf("in octal,your number is %5o.\n",num); return 0;
}