평균
![[1546] 평균](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fc51VlT%2FbtqIRYTLtcC%2F4JbuYPcqo4Dxs2tsLiP9z0%2Fimg.png)
[1546] 평균
시험과목 개수 N -> N개의 int형 배열 생성 -> for문으로 int형 점수 입력 ->그 중 최댓값 M 구하기 (if문 이용) ->for문으로 배열에 있는 점수들을 모두 /M *100으로 계산하여 double형 평균 변수 avg에 넣기. -> 개수 N으로 나눈 값 출력. import java.util.Scanner; public class Average { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = -1; int[] subject = new int[N]; double avg=0; for (int i=0;i