Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a, cons, pros, zeros, n;
  7. cin >> a;
  8. for (int i = 0; i < a; i++){
  9. cin >> n;
  10. if (n > 0){
  11. pros++;
  12. }
  13. else if (n == 0){
  14. zeros++;
  15. }
  16. else{
  17. cons++;
  18. };
  19. };
  20.  
  21. cout << pros << " " << cons << " " << zeros;
  22. return 0;
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement