Created
May 7, 2024 13:53
-
-
Save thenamankumar/64ab4e27d450954de947de273bdbdd88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write a program to generate N random integers between 0 and 99 inclusive. | |
Then display a histogram of those numbers on the command line, with each line corresponding to a bucket of size 20. | |
So if it is asked for 10 numbers, and behind the scenes the program generated: | |
52, 15, 62, 26, 57, 15, 7, 81, 95, 49 | |
Then the command and output would look like this: | |
$ histogram 10 | |
*** | |
* | |
*** | |
* | |
** | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment