Notice
Recent Posts
Recent Comments
Link
«   2026/02   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
Archives
Today
Total
관리 메뉴

hwooo

BOJ (C/C++) 10039번: 평균 점수 본문

Study/Algorithm

BOJ (C/C++) 10039번: 평균 점수

hwooo 2022. 12. 6. 23:03

코드

#include <stdio.h>
int main() {
	int score, sum = 0;
    
	for (int i = 0; i < 5; i++) {
		scanf("%d", &score);
        
		if (score < 40) score = 40;
		sum += score;
	}
    
	printf("%d", sum / 5);
	return 0;
}

'Study > Algorithm' 카테고리의 다른 글

BOJ (C/C++) 13549번: 숨바꼭질 3  (0) 2022.12.08
BOJ (C/C++) 18111번: 마인크래프트  (0) 2022.12.08
BOJ (C/C++) 1654번: 랜선 자르기  (0) 2022.12.05
BOJ (C/C++) 15829번: Hashing  (0) 2022.12.05
BOJ (C/C++) 1259번: 팰린드롬수  (0) 2022.12.05