转载的老师发的答案,关注我,随时更新答案,如果来不及了,可以私信我,我发给你们相应的答案,侵权联系删
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << "Binary"<< setw(9)<< "Octal"<< std::setw(15)<< "Hexadecimal"<<endl;
for (int i = 1;i <= 256;++i)
{
cout << setw(3) << dec << i << setw(9) << oct << i << setw(15) << hex << i << endl;
}
return 0;
}