Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. double range = max - min;
  2. double interval = ceil(range / 10);
  3. double frequency = 0.0;
  4. for (vector<int>::iterator it = x.begin(); it < x.end(); it++)
  5. {
  6. if (*it > min)
  7. {
  8. min = (min + interval);
  9. min = *it;
  10. }
  11. if (*it < max)
  12. {
  13. max = min + interval;
  14. max = *it;
  15. }
  16. if (*it >= min && *it <= max)
  17. ++frequency;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement