Computer Science AP Lab #11 - 4/2/03
Partnered lab - hand in on paper (print-out acceptable if you can get
the printers working)
Today you are to write a program which utilizes a linked list of
doubles. The program should read in an unlimited number of
doubles (with the sentinel value being 0), calculate the average value
of the entered numbers, and then calculate what each value should be
multiplied in order to bring the average of all of the numbers to
10.0. You are then to go through the loop again and multiply each
value by that number such that the resulting linked list will have an
average value of 10.0.
(hint: newaverage = 10 can be seen as oldaverage * changefactor =
10 and by simple math, you can rewrite that as 10/oldaverage =
changefactor)
Obviously you are to comment the code, use subroutines, and the normal
stuff.