Write a program that first gets a list of integers from input. The input begins with...
Fantastic news! We've Found the answer you've been seeking!
Question:
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/650174c98696d_1694594245770.jpg)
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/650174d6b4538_1694594261465.jpg)
Transcribed Image Text:
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value. Assume that the list will always contain fewer than 20 integers. Ex: If the input is: 5 50 60 140 200 75 100 the output is: 50,60,75, The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75. For coding simplicity, follow every output value by a comma, including the last one. Such functionality is common on sites like Amazon, where a user can filter results. LAB ACTIVITY 5.16.1: LAB: Output values below an amount 1 import java.util.Scanner; 2 3 public class LabProgram { 4 5 6 7 8 9 10} 11 LabProgram.java public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int[] userValues = new int[20]; // List of integers from input /* Type your code here. / } 0/10 Load default template... When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This adjustment can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by dividing all values by the largest value. The input begins with an integer indicating the number of floating-point values that follow. Assume that the list will always contain fewer than 20 floating-point values. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System.out.printf("%.2f", yourValue); Ex: If the input is: 5 30.0 50.0 10.0 100.0 65.0 the output is: 0.30 0.50 0.10 1.00 0.65 The 5 indicates that there are five floating-point values in the list, namely 30.0, 50.0, 10.0, 100.0, and 65.0. 100.0 is the largest value in the list, so each value is divided by 100.0. For coding simplicity, follow every output value by a space, including the last one. 484934.3417574.37 LAB ACTIVITY 5.17.1: LAB: Adjust list by normalizing 1 import java.util.Scanner; 2 3 public class LabProgram { 4 5 6 7} 8 public static void main(String[] args) { /* Type your code here. / } LabProgram.java 0/10 Load default template... Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value. Assume that the list will always contain fewer than 20 integers. Ex: If the input is: 5 50 60 140 200 75 100 the output is: 50,60,75, The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75. For coding simplicity, follow every output value by a comma, including the last one. Such functionality is common on sites like Amazon, where a user can filter results. LAB ACTIVITY 5.16.1: LAB: Output values below an amount 1 import java.util.Scanner; 2 3 public class LabProgram { 4 5 6 7 8 9 10} 11 LabProgram.java public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int[] userValues = new int[20]; // List of integers from input /* Type your code here. / } 0/10 Load default template... When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This adjustment can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by dividing all values by the largest value. The input begins with an integer indicating the number of floating-point values that follow. Assume that the list will always contain fewer than 20 floating-point values. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System.out.printf("%.2f", yourValue); Ex: If the input is: 5 30.0 50.0 10.0 100.0 65.0 the output is: 0.30 0.50 0.10 1.00 0.65 The 5 indicates that there are five floating-point values in the list, namely 30.0, 50.0, 10.0, 100.0, and 65.0. 100.0 is the largest value in the list, so each value is divided by 100.0. For coding simplicity, follow every output value by a space, including the last one. 484934.3417574.37 LAB ACTIVITY 5.17.1: LAB: Adjust list by normalizing 1 import java.util.Scanner; 2 3 public class LabProgram { 4 5 6 7} 8 public static void main(String[] args) { /* Type your code here. / } LabProgram.java 0/10 Load default template...
Expert Answer:
Answer rating: 100% (QA)
Answer Python program this list stores the integers listofintegers prompting user for number of i... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
A payment on a loan is $650 a month for 6 years. The principle was $25,000. What was the simple interest rate? Write as a percent with one decimal place.
-
Transform the E-R model of project2 into a relational model. TransactionNo Date Hired Education Employee Address NumberOfItems Email 100 MemberD Name Transaction D Member TypeName Member Classify...
-
A fragile man in his 80s has many sensory and motor deficits from a cerebrovascular accident. When his heart stops, he is resuscitated, and he awakens to find himself hooked up to tubes and machines....
-
Give examples of three exceptions to the Cardozo rule of foreseeability.
-
Explain and provide at least one example of how to qualify the ownership of a table in SQL. What has to occur for one user to be allowed to use a table in a database owned by another user?
-
On October 13, 2024, a fire destroyed one of Wetland Companys warehouses, including all of the inventory stored there and in the adjacent lumber yard. The fire did not affect the inventory held at...
-
Murray Company reports net income of $770,000 for the year. It has no preferred stock, and its weightedaverage common shares outstanding is 280,000 shares. Compute its basic earnings per share....
-
You operate a carwash with one machine. When you charge $10 per wash you expect to have 20,000 customers per year. For every 10c reduction in price you expect to add 250 customers per year. Your...
-
se Moua 7. The term "comprehensive income" as defined by the FASB a, must be reported on the face of the income statement includes all changes in equity during a period except those resulting from...
-
Darcelle teaches skiing at the Snow School. Jack runs a ski shop called Up Hill, Down Hill. Their combined bank interest is $1,000. If they get a refund, they would like the money deposited into...
-
the us inflation rate has been below the federal reserves 2 percent inflation target since 2012 meaning inflation has been low for the past decade. if investors anticpated that inflation were to...
-
Consider: x3 + c (x 1)(x 3)(x + 1) (x + 3x + 9) (x + 2x + 5) How many partial fractions are there in the partial fraction decomposition of this function? How many unknowns (A, B, ...) must be...
-
Hand trace the following program. 1 y 0 2 for x in range (5): y = y + x 4 print ("x",x, "and y =", y) Note: You can shorten the prompts in your hand trace if you want to.
-
Determine the location using physics calculations to solve the problem. Show step by step details for how you solved the problem. I don't need an explanation explaining how to solve the problem. T By...
-
Give a brief explanation about the organization/company i.e., the products or services, number of employees, etc. Do a SWOT chart to help organize your ideas. Refer to resources in the reading for an...
-
How are organization "formal" and "informal" structures impacted in organizational change? Provide some examples. Compare and contrast Lewin's Change Model with Kotter's Change model. (Show how they...
-
What are some of the fundamental differences in preparing the Income Statement for a Service Company verses a Merchandising Company? NO PLAGIARISM PLEASE
-
What mass of KBr (in grams) should you use to make 350.0 mL of a 1.30 M KBr solution?
-
Here is a header file: // golf.h -- for pe9-1.cpp const int Len = 40; struct golf { char fullname[Len]; int handicap; }; // non-interactive version: // function sets golf structure to provided name,...
-
Which member functions are special member functions, and what makes them special?
-
Redo Listing 7.15 without using the array class. Do two versions: a. Use an ordinary array of const char * for the strings representing the season names, and use an ordinary array of double for the...
-
E19.6. Credit Scoring for a Firm with a Ratings Downgrade: Maytag Corporation (Medium) Maytag Corporation is the established manufacturer of washing machines, dryers, dish- washers, and other home...
-
E19.4. Z-Scoring (Easy) Below are ratios for some of the firms that have appeared in this book, for their 1998 fiscal year. Working Retained Capital Earnings Earnings before Interest and Taxes Market...
-
Fruit of the Loom Ltd. fared poorly from 1997 to 1999. Between April 1997 and October. 1999, its stock price dropped from $38 to $3, a 92 percent loss in market value. Fruit of the Loom manufactures...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App