Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double range = max - min;
- double interval = ceil(range / 10);
- double frequency = 0.0;
- for (vector<int>::iterator it = x.begin(); it < x.end(); it++)
- {
- if (*it > min)
- {
- min = (min + interval);
- min = *it;
- }
- if (*it < max)
- {
- max = min + interval;
- max = *it;
- }
- if (*it >= min && *it <= max)
- ++frequency;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement