Question: // A program named SubscriptExceptionTest in which you declare an array of 20 doubles and store values // in the array. Write a try block
// A program named SubscriptExceptionTest in which you declare an array of 20 doubles and store values // in the array. Write a try block in which you place a loop that prompts the user for a subscript // value and displays the value stored in the corresponding array position. Create a catch block // that catches any IndexOutOfRangeException and displays an appropriate error message.
namespace SubscriptExceptionTest.cs { class Program { static void Main() { int num; bool isValueNum = false; while (!isValueNum)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
