Advertisement
Guest User

Untitled

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