Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please advise on the following requirements. Modify the program Figure 2.12 (guess/switch). Ask the user to enter 10 ... 15 Follow this table to output
Please advise on the following requirements.
Modify the program Figure 2.12 (guess/switch). Ask the user to enter 10 ... 15 Follow this table to output the correct value: guess output ----- ------ 10 A 11 B 12 C 13 D 14 E 15 F In other words, the program used to do this: 3 Too High Now it should do this 14 E
This is the code
#include
int main(int argc, char** argv) { int guess; printf("Pick a number 0, 1, 2, 3: "); scanf("%d", &guess); switch(guess){ case 0: printf("Not even close "); break; case 1: printf("Close "); break; case 2: printf("Right on "); break; case 3: printf("Too high "); break; }
return (0); }
Thanks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started