标签:clu blog name cout code -- while names logs
AC:
#include<iostream> using namespace std; int main() { int N; while(cin>>N) { int a[50],i=0; do{ a[i++]=N%8; N/=8; }while(N!=0); for(int j=i-1;j>=0;j--) cout<<a[j]; cout<<endl; } return 0; }
题目1194:八进制----------------------进制转换用do-while就OK了
标签:clu blog name cout code -- while names logs
原文地址:http://www.cnblogs.com/jianrenguo/p/6538088.html