Skip to content

Commit

Permalink
solved:Chapter4-5
Browse files Browse the repository at this point in the history
  • Loading branch information
stopmin committed Jul 7, 2023
1 parent af00ed9 commit fc0eaa4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/Problem/stopmin/Chapter4/Q05.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@ public static void main(String[] args) {
int[] marks = {70, 60, 55, 75, 95, 90, 80, 80, 85, 100};

// TODO: for each 문을 사용하여 A 학급의 평균 점수를 구해 보자.
int average = 0;

for (int entry : marks) {
average += entry;
}
System.out.println(average / marks.length);
}
}

0 comments on commit fc0eaa4

Please sign in to comment.