标签:pen 时间 problem namespace menu ++ 整数 sub mat
把一个十进制正整数转化成八进制。
9
11
1 #include<iostream> 2 #include<cstdio> 3 #include<queue> 4 #include<cmath> 5 using namespace std; 6 int ans[10001]; 7 int now; 8 int tot; 9 int main() 10 { 11 int n; 12 cin>>n; 13 while(n!=0) 14 { 15 ans[now]=n%8; 16 n=n/8; 17 now++; 18 } 19 for(int i=now-1;i>=0;i--) 20 cout<<ans[i]; 21 return 0; 22 }
标签:pen 时间 problem namespace menu ++ 整数 sub mat
原文地址:http://www.cnblogs.com/zwfymqz/p/6502601.html