Write a program that reads a set of floating-point values. Ask the user to enter the values,
Question:
Write a program that reads a set of floating-point values. Ask the user to enter the values, then print
• the average of the values.
• the smallest of the values.
• the largest of the values.
• the range, that is the difference between the smallest and largest.
Of course, you may only prompt for the values once.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 72% (11 reviews)
import javautilScanner public class Main public static void mainString args Scanner input new ...View the full answer
Answered By
SHINKI JALHOTRA
I have worked with other sites like Course Hero as a tutor and I have great knowledge on IT skills.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Write a program and ask the user to enter 3 course grades . Create a function "total" that calculates the total. This function returns a value. the course grades must be entered as float and c...
-
Write a program that prompts the user to enter three strings. Compare the String objects lexicographically and print the middle-valued string. For example, if the three strings were "abcd", "wxyz",...
-
Mean and standard deviation. Write a program that reads a set of floating-point data values. Choose an appropriate mechanism for prompting for the end of the data set. When all values have been read,...
-
In your opinion, was Saks' zero tolerance policy for employee theft reasonable? Was the policy likely cost-effective? Defend your answers.
-
Explain how we make a continuity correction. Why is a continuity correction needed when we approximate a binomial distribution by a normal distribution? Discuss.
-
Fig. 18.1 illustrates the zone of stability. What is the zone of stability? Stable light nuclides have about equal numbers of neutrons and protons. What happens to the neutron-to-proton ratio for...
-
This January there were 751,183 scheduled passenger flights in the United States, and in January of 1996 there were 634,343. For each pair of values, use a percentage to express their relative change...
-
Callaway Golf Co. leases telecommunication equipment. Assume the following data for equipment leased from Photon Company. The lease term is 5 years and requires equal rental payments of $31,000 at...
-
What is this relationship between V out and V in for this circuit? ( Symbols have their usual meaning, with v denoting small signal values )?
-
The graph below displays the sample sizes and percentages of people in different age and gender groups who were polled concerning their approval of Mayor Ford's actions in office. The total number in...
-
Write a while loop that prints a. All squares less than n. For example, if n is 100, print 0 1 4 9 16 25 36 49 64 81. b. All positive numbers that are divisible by 10 and less than n. For example, if...
-
Prime numbers. Write a program that prompts the user for an integer and then prints out all prime numbers up to that integer. For example, when the user enters 20, the program should print 2 3 5 7 11...
-
Two air-track carts move toward one another on an air track. Cart 1 has a mass of 0.28 kg and a speed of 0.97 m/s. Cart 2 has a mass of 0.64 kg. (a) What speed must cart 2 have if the total momentum...
-
1. A and B are two operators, such that [A, B] = c, where c is a number. (a) Show that, e Be=B+c B] = = nc A(n-1). [Hint: First show that [A", Then show that [e4, B] = ce. (b) Use the above result to...
-
(a) What is the recoil velocity of the carriage? (b) What is the average force acting to stop the carriage? (c) If the force stopping it is due to a spring, what is the spring constant of the spring?...
-
For inviscid adiabatic flow, prove the relation 1 Dp p Dt in two ways: =-.u 1. by combining the energy and continuity equations; 2. by applying the isentropic relation p = const to a fluid element...
-
Infinite entropy. This problem shows that the entropy of a discrete random variable can be infinite. Let A = (n logn). [It is easy to show that A is finite by bounding the infinite sum by the...
-
2. Write the number of Significant figures 2) 1.7205 1) 0.00000605 5) 600 9) 550. 13) 86 6) 5.93 x 104 10) 4.150 x 10-6 14) 888.023003 3) 2.50 x 10 7) 0.400010 11) 3670000 15) 200000 4) 0.8000 8) 1.9...
-
Lo-bed Company produced 4,000 units of product that required four standard hours per unit. The standard variable overhead cost per unit is $3.00 per hour. The actual variable factory overhead was...
-
Write the given system without the use of matrices. D) - ()- d (x sin t + 8 (2+ 1)
-
Describe an efficient multimap structure for storing n entries that have an associated set of r < n keys that come from a total order. That is, the set of keys is smaller than the number of entries....
-
The operation get(k) for our multimap ADT is responsible for returning a collection of all values currently associated with key k. Design a variation of binary search for performing this operation on...
-
Give a concrete implementation of the retainAll method for the set ADT, using only the other fundamental methods of the set. You are to assume that the underlying set implementation uses fail-fast...
-
Donald received the following annual returns from his investment: Year 1 8.2% Year 2 -8.3% Year 3 17.8% Year 4 8.8% Calculate the Standard deviation of returns. Round the answer to two decimals...
-
Find the MGF of a continuous random variable with PDF f(x)=2x, 0 < <1. - Find the MGF of the random variable X with PMF Px(x) = pe+ (1 - p)e- z!' r=0,1,... where A and are positive scalars, and p...
-
Q10: For the circuit shown below. Calculate (a) the equivalent resistance, (b) the current through each resistor (c) the power delivered to 6 2, and 12 resistors. (Ans: 50, 13=8A, 16=4A, 1=3A, 14-9A,...
Study smarter with the SolutionInn App