Menu

[solved]-Write Frequency Histogram Program Uses Random Number Generator Rand Write Code C 1 Generat Q39064484

Write a Frequency and Histogram program that uses the randomnumber generator, rand, to:

Write the code in C.

1. Generate 100 numbers between 1 and 22.

2. The array is then to be passed to a modified version ofprogram 8-7 that will count the number of values between 0 and19.

3. Add a 21st element in the array to count all numbers not inthe valid range (0 to 19).

4. Print the input data in a 20 X 5 array-that is, 20 numbers infive rows.

5. Then print the frequency diagram with a heading of thenumbers as shown below.

6. Include a histogram printout of the data. Its format shouldbe similar to the histogram shown in Figure 8-15.

7. Organize your program using separate functions and provide aseparate file for each function

Frequency and Histogram Program Program 8-7 in Chapter 8 of the textbook builds a frequency array. In the discussion of the a

Frequency and Histogram Program Program 8-7 in Chapter 8 of the textbook builds a frequency array. In the discussion of the algorithm, we noted that a potential problem occurs if any of the data are invalid. Write a Frequency and Histogram program that uses the random number generator, rand, to: 1. Generate 100 numbers between 1 and 22. 2. The array is then to be passed to a modified version of program 8-7 that will count the number of values between 0 and 19. 3. Add a 21st element in the array to count all numbers not in the valid range (0 to 19). 4. Print the input data in a 20 X 5 array-that is, 20 numbers in five rows. 5. Then print the frequency diagram with a heading of the numbers as shown below. 6. Include a histogram printout of the data. Its format should be similar to the histogram shown in Figure 8-15. 7. Organize your program using separate functions and provide a separate file for each function –1—2—3—4—5—6—7—9—9—10—11—12—13—14—15—16—17—18—19—Invalid— Show transcribed image text Frequency and Histogram Program Program 8-7 in Chapter 8 of the textbook builds a frequency array. In the discussion of the algorithm, we noted that a potential problem occurs if any of the data are invalid. Write a Frequency and Histogram program that uses the random number generator, rand, to: 1. Generate 100 numbers between 1 and 22. 2. The array is then to be passed to a modified version of program 8-7 that will count the number of values between 0 and 19. 3. Add a 21st element in the array to count all numbers not in the valid range (0 to 19). 4. Print the input data in a 20 X 5 array-that is, 20 numbers in five rows. 5. Then print the frequency diagram with a heading of the numbers as shown below. 6. Include a histogram printout of the data. Its format should be similar to the histogram shown in Figure 8-15. 7. Organize your program using separate functions and provide a separate file for each function –1—2—3—4—5—6—7—9—9—10—11—12—13—14—15—16—17—18—19—Invalid—

Expert Answer


Answer to Write a Frequency and Histogram program that uses the random number generator, rand, to: Write the code in C. 1. Generat… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *