scanf("%d", &n);printf("%X\n", n);
十六进制转十进制
注意8位这个提示,好好看看范围
unsigned int n;scanf("%X", &n);printf("%u\n", n);