Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int N, a[1000], sr = 0;;
- cin >> N;
- for (int i = 0; i < N; i++) {
- cin >> a[i];
- sr+=a[i];
- }
- sr/=N;
- for (int i = 0; i < N; i ++) {
- if ((a[i] > 9) and (a[i] < 100)) a[i] = sr;
- cout << a[i] << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement