subject

Write a method, including the method header, that will receive an array of integers and will return the average of all the integers. Be sure to use the return statement as the last statement in the method. A method that receives an array as a parameter should define the data type and the name of the array with brackets, but not indicate the size of the array in the parameter. A method that returns the average value should have double as the return type, and not void. For example: public static returnType methodName(dataType arrayName[]) 3 The array being passed as a parameter to the method will have 10 integer numbers, ranging from 1 to 50. The average, avgNum, should be both printed in the method, and then returned by the method. To print a double with 2 decimal points precision, so use the following code to format the output: System. out. printf("The average of all 10 numbers is %.2f\n", avgNum);

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
question
Computers and Technology, 23.06.2019 12:50
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
Answers: 1
You know the right answer?
Write a method, including the method header, that will receive an array of integers and will return...
Questions
question
Spanish, 20.10.2019 18:30
question
Geography, 20.10.2019 18:30
Questions on the website: 13722361