Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- double sum = 0, mult = 1;
- int a[10], i;
- for (i = 0; i < 10; i++)
- {
- cin >> a[i];
- }
- for (i = 0; i < 10; i++)
- {
- if (a[i] % 2 == 0)
- mult *= a[i];
- if (a[i] < 0)
- sum += a[i];
- }
- if (mult != 1)
- cout << "mult = " << mult << endl;
- else
- cout << "There is no chetnih chisel" << endl;
- if (sum != 0)
- cout << "sum = " << sum << endl;
- else
- cout << "There is no negative numbers" << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement