#include "stdio.h" int main() { int num=0;int a[100]; int i=0; int m=0;int yushu; char hex[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};printf("请输入一个十进制整数:"); scanf("%d",&num); while(num>0) { y…
#include <iostream>#include <cmath>using namespace std; int main(){ int num = -1; unsigned int s = num; //当前位级表示即为最大无符号数 cout << (int)log2(s)+1 << endl; //第一种 int intSize = 0; while(s != 0) { s = s >> 1; intSize…