I'm just a beginner in Java. Can someone please tell me how to arrange this program. In this program I want to store 10 marks in an array, and then output the ones that are equal to or greater than the average. Help would be appreciated.
public class ClassAverage{
public static void main (String Args []){
int sum = 0;
int mark[] = new int [10];
for(int c = 0; c < 10; c++){
System.out.print("Enter a mark: ");
mark[c] = Keyboard.readInt();
}
sum = sum + mark[c];
int average = sum / 10;
if(mark[c]>=average){
System.out.print(mark[c]);
}
}
}