Question: C# 2- Write a C# code segment that has a do while loop that ends when a 9 is entered by the user. Inside the
C#
2- Write a C# code segment that has a do while loop that ends when a 9 is entered by the user. Inside the loop are statements to do the following: Displays a menu of the following options: 1. calculate a square of a number 2. calculate square root of a number 9. quit. Read a menu option from the console. If option equals 1 then first read a number from the console and use Math.Pow(number, 2) to find and display the square. If option equals 2 then first read a number from the console and use Math.Sqrt(number) to find and display the square root. If option equals 9 then display a message Thank you for using the square calculator.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
