Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void SolvePB()
- {
- int n, v[100], p = 0, ne = 0;
- cin >> n;
- for (int i = 0; i < n; i++)
- cin >> v[i];
- for (int i = 0; i < n; i++)
- if (v[i] < 0)
- ne++;
- else
- p++;
- cout << "pozitive:" << p << endl << "negative:" << ne;
- }
- int main()
- {
- SolvePB();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement