120k views
2 votes
Write a program that can convert an integer between 0 and 15 into hex number (including 0 and 15). the user enters an integer from the console and the program displays the corresponding hex number. if the user enters an integer out of range, the program displays a warning message about the invalid.

1 Answer

3 votes
Range check what the user enters, if it's legit, a character array can be used.
User Mcarifio
by
7.7k points