Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C# please with screen shot Lab4C: Creating a menu For this lab exercise you are going to create a basic program which will allow the
C# please with screen shot
Lab4C: Creating a menu For this lab exercise you are going to create a basic program which will allow the user to make a selection from a menu; selecting a different option from the menu should result in a different outcome. For this lab, please use a switch statement for all possible options the user may input. First, welcome the user with the welcome message (present in the sample runs below) that explains what the program does and what the user is expected to do. Next have the user input a number; based on the number inputted one of the various transformations must be performed. If the user chooses to exit the program, display "Thank you, goodbye!". If the user inputs attempts to input a number that is not on the menu, display "Invalid input, please try again!" Hints: - Additive inverse of 5 is 5 - Reciprocal of 3 is 1/3 - There are some math functions to help with exponents (X2 and X3) however, you don't need to use them for this lab. Remember, the class name should b Lab4C. Sample runs are shown below. The user input is in bold. Sample run \#1: Welcome! Please input a number: 100 What would you like to do to this number: 0) Get the additive inverse of the number 1) Get the reciprocal of the number 2) Square the number 3) Cube the number 4) Exit the program 0 The additive inverse of 100.0 is 100.0 Sample run \#2: Welcome! Please input a number: 50 Welcome! Please input a number: 500 What would you like to do to this number: 0) Get the additive inverse of the number 1) Get the reciprocal of the number 2) Square the number 3) Cube the number 4) Exit the program 2 The square of 500.0 is 250000.0 Sample run \#4: Welcome! Please input a number: 9 What would you like to do to this number: 0) Get the additive inverse of the number 1) Get the reciprocal of the number 2) Square the number 3) Cube the number 4) Exit the program 3 The cube of 9.0 is 729.0 Sample run #5 : Welcome! Please input a number: 100 What would you like to do to this number: 0) Get the additive inverse of the number 1) Get the reciprocal of the number 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