Menu

Wondering Get Help C Programming Requirements Says Anything C Please Provide Answer C Writ Q43864963

I am wondering if I can get help with my C programming. Theseare the requirements. If it says anything about C++ please provideanswer in C as that is how I am writting my code.

Modify the program Figure 2.12 (guess/switch). Ask the user to enter 0 … 15Follow this table to output the correct value:guess output—– —— 0 0 1 1 …. 9 9 10 A 11 B 12 C 13 D 14 E 15 F Improve the output message to explain the input is decimal and the output is hexadecimalIn other words, the program used to do this:14ENow it should do this 1414 decimal is E in HexIf you run it again:44 decimal is 4 in HexIf you run it again:1111 decimal is B in Hex

This is my code:

#include <stdio.h>
#include <stdlib.h>

int main() {
int guess;
  
printf(“Pick a number 10, 11, 12, 13, 14, 15: “);
scanf(“%d”, &guess);
  
switch(guess){
case 10: printf(“An”); break;
case 11: printf(“Bn”); break;
case 12: printf(“Cn”); break;
case 13: printf(“Dn”); break;
case 14: printf(“En”); break;
case 15: printf(“Fn”); break;
}

return (0);
}

thanks

Expert Answer


Answer to I am wondering if I can get help with my C programming. These are the requirements. If it says anything about C++ please…

OR