Math, asked by Debbie06, 2 days ago

In class interval 50-55, 55-60, which class should I include frequency 55 in?​

Answers

Answered by poojagchavan24
0

Answer:

A program P reads in 500 integers in the range [0..100] representing the scores of 500 students. It then prints the frequency of each score above 50. What would be the best way for P to store the frequencies?

A very simple solution is mentioned here.

Create an array of length 50.

It stores frequencies for numbers from 51–100. Note that there are 50 possible integers in this range. 1st value in array stores frequency for 51, 2nd for 52 and so on. Also, in languages where default value is not ‘0’ for integer arrays, you would have to initialise it.

Now as you read the integers, see if their value is greater than 50. If yes, just increase the count in array at index (value-51) by 1.

Index starts at 0 in most languages, thus, a ‘0’ index stores count of scores of 51 and so on.

Answered by arvetivarshini
2

Answer:

include 55 in class fequesncy of 55-60

Similar questions