标签:height image cout iostream ret 技术 com end main
源程序:
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int n = 65535,m = 20;
cout<<"1)"<<n<<"n"<<"="<<hex<<n<<"="<<oct<<n<<endl;
cout<<"2)"<<setbase(10)<<m<<"="<<setbase(16)<<m
<<"="<<setbase(8)<<m<<endl;
cout<<"3)"<<showbase;
cout<<setbase(10)<<m<<"="<<setbase(16)<<m<<"="
<<setbase(8)<<m<<endl;
return 0;
}
运行结果:
进制转换
标签:height image cout iostream ret 技术 com end main
原文地址:https://www.cnblogs.com/duanqibo/p/12235952.html