C++ 程序:输出 0 到 15 的二进制和十进制数
#include <iostream>
#include <bitset>
using namespace std;
int main() {
for (int i = 0; i <= 15; i++) {
cout << bitset<4>(i) << "B " << i << endl;
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/pPU3 著作权归作者所有。请勿转载和采集!