2) A histogram is a graphical representation of data, where the area is proportional to the frequency
Fantastic news! We've Found the answer you've been seeking!
Question:
2) A histogram is a graphical representation of data, where the area is proportional to the frequency of a variable and the width is equal to the class interval. We want to write a module that takes a value n, and a character c, and displays the character in c, n times. Write both iterative and recursive versions of the function to display the value n, followed by n character c's on the screen horizontally. E.g. 1. calling the function with the number 10 and character '=' as arguments will display: 10 ========== E.g. 2. calling the function with 3 and '*' as argument will display: 3 *** a. write the C++ or Java code implementation code for both the iterative and recursive solutions for this problem b. demonstrate the use of both algorithms in a complete program. i.e. Create a main method that will prompt the user for a number and a character and call both methods to display each histogram.
Related Book For
The Analysis Of Biological Data
ISBN: 9781319226237
3rd Edition
Authors: Michael C. Whitlock, Dolph Schluter
Posted Date: