Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- const int M = 5;
- int m[M];
- bool c = false;
- for (int i = 0; i < M; i++) {
- cin >> m[i];
- }
- for (int j = 0; j < M; j++) {
- if (m[j] < 0) {
- cout << j << endl;
- c = true;
- }
- }
- if (c == false)
- cout << "Is not here negative elements\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement