Question: 7. Solution must be in C#. Write the program FindSquareRoot that finds the square root of a users input value. The Math class contains a
7. Solution must be in C#.
Write the program FindSquareRoot that finds the square root of a users input value. The Math class contains a static method named Sqrt() that accepts a double and returns the parameters square root. If the users entry cannot be converted to a double, display an appropriate message, and set the square root value to 0. Otherwise, test the input numbers value. If it is negative, throw a new ApplicationException to which you pass the message Number cant be negative. and again set sqrt to 0. If the input value is a double and not negative, pass it to the Math.Sqrt() method, and display the returned value.

FindSquareRoot.cs 1 sing System; 2 using static System.Console; 3 class FindSquareRoot 4 5 static void Main() 6 7 8 Your code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
