i really need help for a project of mine.i'll write what is whole program about. any ideas who is sufficent to solve problem will be appriciated. thanx from now.
“A histogram is an efficient visualization of the distributions. The construction of histograms is simple. The x-axis is the consecutive intervals; y-axis is the frequencies of data that falls into a small interval (number of data that has a value in this interval).”
In this project, you are going to implement a simple histogram that x-axis is the frequencies of the values in the data that falls into a small interval; y-axis is the consecutive intervals. The user enters 20 values. There are 10 intervals (10 frequency values). And you are going to output the histogram of this data.
The code of the following functions are given, do not manipulate them:
void ReadNumbers(float numbers);
int DrawHistogram(int frequency);
* ReadNumber function takes a data from the user and assigns the values to array, numbers.
* DrawHistogram prints the character '-' as many as the value of the frequency at each row. As you can see in the function, the index of the array increases at each row.
Write only the following functions (without using printf and scanf and do not forget to enter their parameters in function calls in the main() function!!!) :
void FindBounds(float numbers,float *min,float *max);
int FindFrequency(float numbers,int frequency, float min,float max);
* FindBounds function takes three parameters. You are going to find the minimum and maximum value of the data, subtract 2 from minimum value and add 2 to the maximum value (2 is a constant for the epsilon value that enlarges the interval),then assign to the min and max respectively.
* FindFrequency function takes four parameters. The width of each interval is equal. You have 10 consecutive intervals between min and max parameters. Find the width of the intervals (bin width). Find each frequency by calculating the number of intervals greater than the minimum value of the corresponding interval and less than or equal to the maximum value of the corresponding interval. Fill the frequency array in the increasing order of its indexes as the lower bound of each interval increases.
An example for input output form: