Question: Please help, I have GetNumber written and shown. I dont know how to do the rest in C# (suggestion for GetArray provided) GetNumber Reuse the

Please help, I have GetNumber written and shown. I dont know how to do the rest in C# (suggestion for GetArray provided)  Please help, I have GetNumber written and shown. I dont know
how to do the rest in C# (suggestion for GetArray provided) GetNumber
Reuse the GetNumberO method that you have been refining in the previous

GetNumber Reuse the GetNumberO method that you have been refining in the previous two labs. Get Array Using your GetNumberO method, create a method that will read in an array from the console. Begin by reading a number from the console which represents the size of the array to be read in. Then proceed to read in the specified number of elements Make sure to store the values obtained from the console in an array PrintArray Develop a method that prints all the elements within the array passed to it. Exercise 7-4 Using the functions inentioned above, develop a routine that finds the longest consecutive sequence of integers. Should two integer values have consecutive sequences of the same length, the sequence composed of greater values would be the result (see example 2) Example 1: Consider the set [1, 2. 3, 3, 3.3. 4,5, 5. 5), the result would be (3, 3, 3, 3] Example 2: Consider the set (1, 2.5,5,5.4 4 4 even though there are consecutive sequences composed of Ss and 4's of length 3 the result should be the sequence composed of greater va lues, therefore the result is be (5, 5,5). Exercise 7-5 Using the functions mentioned above, develop a routine that finds the longest consecutive sequence of consecutively increasing integers, In the event that there are two sequences that have the same length the result should be the sequence that contains greater values (see esample 2), Example 1: Consider the set (1,2. 4,45,6. 7, the result would be (4,5,6 7 Example 2: Consider the set (2, 4, 3,4,5, 8, 1,2. 3) where there are two subsets (3, 4,5) and (1, 2, 3) that satisty the criteria. Your result should be (3, 4, 5) as it is the subset that satisfies the criteria with the greatest values public static int[] GetArray() // get array should prompt for a valid size of array, // and keep asking until it gets a valid number, 'n' 11it should then input values ignoring bad values until there are 'n II valid items in the array. /I if a size of zero is entered return null // throw new NotImplementedException()

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!