import java.util.*;
public class GreThanAvg {
public static void main(String args[]) {
int arr[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
int sum = 0;
for (int i = 0; i < arr.length; i++) {
sum += arr[i];
}
int avg = sum / arr.length;
System.out.println(
"The elements which are greater than average of array are"
);
for (int i = 0; i < arr.length; i++) {
if (arr[i] > avg) {
System.out.print(arr[i] + ",");
}
}
System.out.println();
}
}