subject

Revise the meanmedian class so that the user can enter any number of values up to 20. if the list has an even number of values, the median is the numeric average of the values in the two middle positions. allow the user to enter to quit entering numbers. import java. util.*; class meanmedian2{public static void main(string[] args){// int[] nums; int num = 0; string entry; string list = "you entered: "; int a, b; int temp; double median; int total = 0; double mean = 0; final int quit = ; int size = 0; for(a = 0; num ! = quit & & a < nums. length; ++a){// your code here}system. out. println("size is " + a); if(num ! = quit)size = nums. length; elsesize = a - 1; system. out. println("size is " + size); system. out. println(list); int comparisonstomake = size - 1; for(a = 0; a < size - 1; ++a){for(b = 0; b < comparisonstomake; ++b){if(nums[b] > nums[b + 1]){temp = nums[b]; nums[b] = nums[b + 1]; nums[b + 1] = temp; }}--comparisonstomake; } // your code heresystem. out. println("the mean is " + mean +" and the median is " + median); }}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
Page orientation can be either landscape or
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
question
Computers and Technology, 25.06.2019 00:30
Which email writing etiquette should ariel follow to let people know that she received their message? a. reply to their messages immediately b. use formal language c. specify the email's intent in the subject field d. be direct when writing the reply
Answers: 1
You know the right answer?
Revise the meanmedian class so that the user can enter any number of values up to 20. if the list ha...
Questions
question
History, 02.11.2019 08:31
question
History, 02.11.2019 08:31
Questions on the website: 13722361