본문 바로가기

프로그래밍/백준

10039 평균 점수

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import java.util.*;
 
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int score;
        int sum = 0;
        for(int i=0; i<5; i++) {
            score = sc.nextInt();
            if(score < 40) {
                score = 40;
            }
            sum += score;
        }
        System.out.println(sum/5);
    }
}
cs


'프로그래밍 > 백준' 카테고리의 다른 글

10809 알파벳 찾기  (0) 2017.10.15
11654 아스키 코드  (0) 2017.10.15
2920 음계  (0) 2017.10.14
8958 OX퀴즈  (0) 2017.10.14
2577 숫자의 개수  (0) 2017.10.14