Question: 5. Write three methods. a) Write a method that retums the index of the smallest element in a onedimensional array of integers. If the number

 5. Write three methods. a) Write a method that retums the

5. Write three methods. a) Write a method that retums the index of the smallest element in a onedimensional array of integers. If the number of such elements is greater than 1 , return the smallest index. b) Write a method that returns the sum of all the elements inside a two dimensional array. c) Write the main method to test the above two methods. Here are the examples. 2. the output of after calling the method is 1 . (xample for b): assume input arry as (1,2);(3,4) the outpot of a her calling the method is 10

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!