Array problem to solve

{“Bhautik”,“99”,“21”,“ajay”,“89”,“10”,“shalu”,“47”,“71”,“69”,“3”,“Rohit”,“19”}

This is input array we need to print smallest and largest element from this array as a output.
Please help me to solve this.

numericArray= inputArray.Where(Function(item) Int32.TryParse(item, New Int32)).Select(Function(item) Convert.ToInt32(item)).ToArray()
smallest = numericArray.Min()
largest = numericArray.Max()

1 Like

thanks for the help.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.