C++的问题(英文)。求高人帮忙解决,谢谢!

来源:百度知道 编辑:UC知道 时间:2024/05/17 04:31:33
Using a random number generator, generate 10, 000 integers between 0
and 9,999. Place them in a list<int> container. Compute and print the
median value. What was expected? Compute the frequencies of each
value; in other words, how many 0s were generated, how many 1s were
generated, and so forth. Print the value with greatest frequency. Use a
vector<int> to store the frequencies. Be noticed that you should use
algorithm, function object and function adapter.

使用一台随机发电器,引起10 000个整数在0-9999之间。安置他们在名单容器。计算和打印中间值。什么被期望了?计算各价值频率;换句话说,多少0s引起了,多少1s引起了,等等。中间价值以最巨大的频率。使用传染媒介存放频率。被注意您应该使用算法、作用对象和作用适配器