标签:八进制 blog bsp std oct namespace include class ret
进制转换:
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int a=0; 6 cout<<"请输入一个十进制的数"<<endl; 7 cin>>a; 8 cout<<"它的十进制是:"<<endl; 9 cout<<dec<<a<<endl; 10 cout<<"它的十六进制是:"<<endl; 11 cout<<hex<<a; 12 cout<<"它的八进制是:"<<endl; 13 cout<<oct<<a<<endl; 14 return 0; 15 }
标签:八进制 blog bsp std oct namespace include class ret
原文地址:http://www.cnblogs.com/enyala/p/7765880.html