#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
cout << "请输入一个整数" << endl;
int i;
cin >> i;
cout << "八进制:" << oct << i << ",";
cout << "十六进制:" << hex << i << ",";
cout << "十进制:" << i << ",";
cout << "布尔值:" << boolalpha << (bool)i << endl;
cin.get();
cin.get();
return 0;
}
热门评论
还能这样啊?。。长知识了