(Create a program that will allow the user to enter and analyse a set of data collected from an
experiment. The data is to be entered by the user from the keyboard and stored in an array to be
processed by the program. It is known that all the data values will be in the range 0 to 499. The
termination of data entry will be signalled by the user entering the special value -999. The program
should then use functions to calculate the highest and lowest value entered and the mean of the values
(you must use a separate function for each). The program should then display the values entered, the
number of values entered, the highest, lowest and mean (A pass can be obtained for getting this far).
Additional tasks
Allow the data to be entered by reading a file as well as from the keyboard.. Use the function provided
by the lecturer.
Add a function to sort the numbers into ascending numerical order so that the list of values printed
will be in ascending order.
Next calculate the frequency with which data occurs in the groups 0-99, 100 - 199, etc. up to 400 -
499. Hence draw a simple histogram horizontally across the PC’s screen for the five groups. In your
report discuss how you would modify your program to allow different groupings for the histogram. [
Hint: After counting the totals for each group use these totals to control the printing of a line of * ‘s
across the PC’s screen]
Typical output :-
Number of data values = 102
Highest = 475
Lowest = 33
Mean = 234.4
Sorted values : 23, 33, 89, 120, 122, etc.
Range Relative frequency -->
0 - 99 :******************
100 - 199 :**************************
200 - 299 :*************
300 - 399 :**********************
400 - 499 :***********************)


I dont know how to do the sorting and the relative frequency could anybody help me pleazzz, thank you :cry: :cry: :cry: :-|

Please don't post duplicate threads.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.