Question: 5 . 1 6 LAB: Adjust list by normalizing Whan analyzing data sets, such as data for human haights or for human waights, a comman
LAB: Adjust list by normalizing
Whan analyzing data sets, such as data for human haights or for human waights, a comman stap is to adjust tha data. This acfustmant can
be dona by nomalizing to values between and or throwing awry outars
For this prograt, adjust the values by dwiding al values by tha largest valua. The input bagins with an intage indicating the number of
flatingpoint valuas that followc Assume that the list will ahays contain fower than floatingpoint valuas.
Qutput aach flaztingpoint valua with two dipits aftar the daciral point, which can be achizvad as fallews:
syatem.out.printzE yourValua;
Ex: If tha ingut is:
tha autput is:
The indizatas that there are five fleatingpoint valuas in the list, namaly and is the largest value in the
list, so asch value is divided by
For coting simpliaity, follow avary output valua by a soace, insluding the last ona.
LabProgram.java
Find the Largest value
double raxvalue values:
for int ; nunvaloes;
if values naxvaloe
maxvalue values;
Normalize the values by dividing by the Largest value and print then
for Int i e; i nurvaleos;
double norralizedvalue valoesi maxvalue;
Systen.out.printff norralizedvalue;
Close the scanner
scnrclose:
When done developing you program, press the Submit for grading button below. This wil
submit you proyam for autoyrading.
Cociratrall af your work What lathlis?
Latest submission : PM CDT on
Only show failing tests
:Compare output a
Output is naarly corract, but whitespaca differs. Sas highights below. Souclel ehasetur lugard
Ingut
Your output
Expestad output ##
:Cormare output A
Output is nearly corract, but whitespace differs. Sae highights below. Souelel chasetarlagurd
Ingut
Yaur output
Expestad output #
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
