题解 | #八进制#
八进制
https://www.nowcoder.com/practice/eda051c1effc4dffa630bc8507f0c5f7
#include <stdio.h> int main() { int n; while (scanf("%d",&n) != EOF) { int s[20],cnt=0,temp; while(n>0) { temp=n%8; s[cnt++]=temp; n/=8; } for(int i=cnt-1; i>=0; i--) { printf("%d",s[i]); } printf("\n"); } return 0; }