Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int a[35], n, sum(0);
- cin >> n;
- for(int i = 1; i <= n; ++i)
- cin >> a[i],
- sum += a[i];
- for(int i = 1; i <= n; ++i)
- if(a[i] >= (double) sum * 1.0 / n)
- cout << a[i] << " ";
- }
Add Comment
Please, Sign In to add comment