Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me, I don't know how to write the code in c# that would do the problem. The functions mentioned above are provided. The

image text in transcribedimage text in transcribedimage text in transcribed

Please help me, I don't know how to write the code in c# that would do the problem. The "functions mentioned above" are provided. The tests for the exercise are provided with the anticipated results.

Using the functions mentioned abave develop a routine that finds the ongest consecurive requence of integers shouid two integer values have consecutive sequences of the same length the sequence composed of greater values wouild be the result see example 2) Example 1 Consider the set (d 2.3 3, 3,3 45 5 5 the resuit would he 913 3 3 Example 2 Consider the set /1. 2, 5 5 5 4 4.4 even thoug thee ae consecutive sequences composed of ssand t'sof length 3 the result should be the seqvence composed of greater values therefore the result is be is s5k Debug Team Tools Architecture Test R Tools AnalyzeWindowHelp ug Any CPU Lab3 nitTestl.cs Program.cs Lab3 ConsoleApp2.Program 6 references 2 days ago 1 2 authors, 2 changes : public static int? GetNumber) 16 17 18 19 20 21 int xi string a (Console.ReadLine()) if (int.TryParse(a, out x)) return x else return null; 23 24 25 4 references 1 2/2 passing : public static int[] GetArray 2 days ago | 2 authors, 2 changes 27 int loc = e, value, num; int[] nums; int? proof, length = GetNumber(); while (lengthnull) 31 32 length GetNumberO: if (length) return null 34 35 36 37 38 39 E 40 41 42 E 43 else int len length?? default(int); nuns new int[len]; for (value-0; value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

Answered: 1 week ago

Answered: 1 week ago