网址:
#include#include using namespace std;int main(){ int n; while(cin>>n) { int m; stack s; while(n > 0) { m = n % 8; n = n / 8; s.push(m); } while(!s.empty()) { printf("%d",s.top()); s.pop(); } printf("\n"); } return 0;}
本文共 457 字,大约阅读时间需要 1 分钟。
网址:
#include#include using namespace std;int main(){ int n; while(cin>>n) { int m; stack s; while(n > 0) { m = n % 8; n = n / 8; s.push(m); } while(!s.empty()) { printf("%d",s.top()); s.pop(); } printf("\n"); } return 0;}
转载于:https://blog.51cto.com/20111564/1403234