Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main() {
- int niza[10];
- int pozitivni = 0;
- int negativni = 0;
- cout << "Vnesi 10 broja" << endl;
- for (int i = 0; i < 10; i++) {
- cin >> niza[i];
- }
- for (int i = 0; i < 10; i++) {
- if (niza[i] >= 0) {
- pozitivni++;
- } else {
- negativni++;
- }
- }
- cout << pozitivni << " pozitivni broevi, " << negativni << " negativni broevi" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement