Question: This is for Joyce Farrell's book Microsoft visual c# 2015: an introduction to object oriented programming 6th edition page 349 PE 2. This is what

This is for Joyce Farrell's book Microsoft visual c# 2015: an introduction to object oriented programming 6th edition page 349 PE 2.

This is what I have so far. I'm trying to figure out the part where it says "if an entry is not an integer, reprompt the user." I tried doing int.TryParse(fillint[x], out exceptionHand) but it wouldn't take the array. I'd like to create a while loop that reprompts the user. I also am having difficulty figuring out how to "call a second method that accepts out parameters for the highest value in the array, lowest value in the array, sum of the values in the array, and arithmetic average." Any help would be greatly appreciated. This is for self study not school work.

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static System.Console;

namespace sandbox1.cs { class Program { static void Main(string[] args) { int[] intArray = new int[20]; fillIntArray(intArray);

} private static void fillIntArray(params int[] fillInt) { int exceptionHand; WriteLine("Enter up to 20 values or type 'y' or 'n' to stop"); for (int x = 0; x < 20; x++) { fillInt[x] = Convert.ToInt32(ReadLine()); WriteLine(fillInt[x]); }

}

} }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!