SHARE
TWEET

PlusMinus

a guest Nov 16th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int n = arr.size();
  2. int pos = 0, neg = 0;
  3.  
  4. for (auto it : arr) {
  5.     if (it < 0) neg++;
  6.     if (it > 0) pos++;
  7. }
  8.  
  9. int zer = n - pos - neg;
  10. cout << pos << '/' << n << endl;
  11. cout << neg << '/' << n << endl;
  12. cout << zer << '/' << n << endl;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top