+ 1
Convert Binary to hexadecimal
I want to convert 7 Binary numbers from user to hexadecimal in cpp
2 Antworten
0
If you read the input as a char[] you can use
int x = strtol(input, NULL, 2); /* <stdlib.h> */
to store the input in x and
printf("%X",x); /* <stdio.h> */
to print it out as hexadecimal number.
0
10110100