package placementseason;
public class PlacementSeason {
public static void main(String[] args) {
//You can any integer to test the program
int student[] = {4 , 9 , 5 , 3 , 2 , 10};
System.out.printf("Output:\n");
for(int i=0; i<6; i++){
int count = 0;
for(int j=0; j<i; j++){
if(student[j]>= student[i]){
count++;
}
}
System.out.printf("%d, ",count);
}
}
}
Comments
Leave a comment