Question: Visual Basic Assume the array nums contains a list of positive integers. Choose a correct description of the following Function procedure 33 through 38. 33.

Visual Basic

Assume the array nums contains a list of positive integers.

Choose a correct description of the following Function procedure 33 through 38.

33. Function getSum (nums() As Integer) As Integer Dim sum As Integer = 0 Dim x as Integer For Each x In nums sum += xum Next Return sum End Function 34. Function getAverage(nums() As Integer) As Double Dim sum As Integer = 0 For Each As Integer In nums sum += num Next Return sum / nums.Count End Function 35. Function getMaxEven(nums() As Integer) As Integer Dim maxEven As Integer = 0 For Each num As Integer In nums If (num Mod 2 = 0) And (num > maxEven) Then maxEven = num End If Next Return maxEven End Function 36. Function getMin(nums() As Integer) As Integer Dim min As Integer = nums(0) For Each num As Integer In nums If num  9) And (num  

Answer

33

34

35

36

37

38

Visual Basic Assume the array nums contains a list of positive integers.

Visual Basic

the number of even numbers in the array None is a correct answer the smallest number in the array the average of the numbers in the array the number of two-digit numbers in the array the sum of the numbers in the array the largest even number in the array (If there are no even numbers in the array, the Function procedure should return 0. )

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!