Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n = arr.size();
- int pos = 0, neg = 0;
- for (auto it : arr) {
- if (it < 0) neg++;
- if (it > 0) pos++;
- }
- int zer = n - pos - neg;
- cout << pos << '/' << n << endl;
- cout << neg << '/' << n << endl;
- cout << zer << '/' << n << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement