Exercise arrays, conditionals and loops in Java.
Java programs:
Design and implement an application called Mean.java that computes and prints the mean of two lists of integers coming from the same list that has n numbers: x0, x1, , xn-1. The first list L1 contains x0, x2, , through xn-1 if n is odd or through xn-2 if n is even. The second list L2 contains x1, x3, , through xn-1 if n is even or through xn-2 if n is odd. Ask the user to input n and read the value of n. Then ask the user to input n integers and save them in an array. Print out L1 and compute the mean as a floating point value for L1. Then print out L2 and compute the mean as a floating point value for L2, using the following formula:
Reviews
There are no reviews yet.