#include #include #include #include #include #include using namespace std; int main() { random_device rd; mt19937 gen(rd()); normal_distribution<> d(5, 2); map hist; for (int n=0; n<10000; ++n) ++hist[round(d(gen))]; for (auto p : hist) cout << fixed << setprecision(1) << setw(2) << p.first << ' ' << string(p.second/200, '*') << '\n'; }