William is interested in numbers. His friend Mary has been programming using Visual Basic and has told William about the Radom Number facility that the programming language provides.
William never takes anything for granted and says to Mary:
“I wonder how good this random number generator is.
Suppose you write a program to generate random positive integers in the range 1 to 1000.
Generate them in blocks of 10, 100, 1000, 10000.
For each block test how many odd and even numbers there are in the block.
Then display for each block, in some graphical manner, the number of odd integers and the number of even integers.
If the random generator is good then for the blocks with 10000 numbers the numbers of odd and the numbers of even should be close to equal.
BUT what will the results for the smaller blocks look like?”
Write the program that William has asked Mary to construct.
Allow William to input how many times he wants the program to be run ensuring that different sets of numbers are generated for each run.

4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by itismypushkin

Nice, heart touching story.

Agreed, seems that William is not as bright as we thought.

hahahaha...too bad for William..lt me kno if u manage to do d program..lol

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.