Q1) How to use C code to write a C program segment to prompt a user for entering an integer and save it into an “option” variable. In your program, you have to make sure the value (option) entered by the user is either 1, 2 or 3 only. Otherwise, display a message asking the user to re-enter the “option” value. [Note: Assume that all the necessary variables have been declared]

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section13.1: Single Structures
Problem 6E
icon
Related questions
Question

Q1) How to use C code to write a C program segment to prompt a user for entering an integer and save it into an “option”
variable. In your program, you have to make sure the value (option) entered by the user is either
1, 2 or 3 only. Otherwise, display a message asking the user to re-enter the “option” value.
[Note: Assume that all the necessary variables have been declared]

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr