[C language advanced] Hexadecimal to decimal conversion

Title description
BoBo wrote a hexadecimal integer ABCDEF, and he asked what the decimal integer corresponds to KiKi.

Input description:
None
Output description:
The decimal integer corresponding to the hexadecimal integer ABCDEF, the domain width is 15.
Remarks:
printf can use the format control string "%md" to output a decimal integer with a field width of m.

#include<stdio.h>
int main(){
    
    
	int n;
    printf("%15d",0XABCDEF);
    return 0;
}

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43762735/article/details/109340215