Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- const int N = 7;
- int ar[N] = {-1,-2,3,-10,2,1,80};
- int sum = 0;
- for(int i = 0; i < N; i++)
- sum += ar[i];
- for(int i = 0; i < N; i++)
- {
- if(ar[i] > sum) cout << i << " ";
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement