subject

You are to write a program that performs basic statistical analysis on a 500 element array of integers. Your program should include the following programmer defined functions: int* generateArray(int size){
This function should dynamically create an array of 501 elements and provide random numbers to fill the array. The random numbers should range from 10 to 100. The function should return the created array to the array generated in the main program.

}

int findMode(int *arr, int size){
This function should analyze the array to find the most occurring value in the array. You do not have to account for bi-modal occurrences, so the first modal value is enough to satisfy this function definition.
}

int findMedian(int *arr, int size){
This function should determine the median of the set of numbers in the array. Since there are 501 elements, you should have a clean median. Do not forget that the list has to be sorted in order to properly find the median.
}

Of course, main is critical to the function of your program and should output the mode, median of the list. An output of the 501 element array is not necessary.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Eye injuries usually occur as a result of all of the following things, except: a) proper machine operation b) battery explosion c) falling or flying debris d) electric welding arc
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
question
Computers and Technology, 24.06.2019 02:20
The first time a user launches the powerpoint program, which view is shown allowing the user to access recent presentations or create new presentations based on templates?
Answers: 1
You know the right answer?
You are to write a program that performs basic statistical analysis on a 500 element array of intege...
Questions
question
Mathematics, 23.10.2020 02:01
question
Mathematics, 23.10.2020 02:01
question
Chemistry, 23.10.2020 02:01