백준 자바 평균1 [백준/JAVA] 1546번 평균 import java.util.Scanner; public class Main {public static void main(String args[]) {Scanner in = new Scanner(System.in);int input = in.nextInt();double[] arr = new double[input];double max,average = 0;for (int i = 0; i < input; i++) {arr[i] = in.nextDouble();}max = arr[0];for (int i = 0; i < input; i++) {if (max < arr[i])max = arr[i];}for (int i = 0; i < input; i++) {arr[i] = arr[i] / max * 100.. 2020. 7. 23. 이전 1 다음