#include <stdio.h>
#include <stdbool.h>
int main() {
int scoreList[11] = {0};
int score;
while (true) {
scanf("%d ", &score);
if (score == 0) {
break;
}
score /= 10;
scoreList[score]++;
}
for (int i = 10; i > 0; i--) {
printf("%d - %d\n", i * 10, scoreList[i]);
}
return 0;
}
'Algorithm(CodeTree, C++) > 1차원 배열' 카테고리의 다른 글
[코드트리] 나눗셈의 나머지 C (0) | 2024.05.18 |
---|---|
[코드트리] 코로나 메뉴얼2 C (0) | 2024.05.18 |
[코드트리] 십의 자리 숫자 C (0) | 2024.05.15 |
[코드트리] 주사위 놀이 C (0) | 2024.05.15 |
[코드트리] 1-9 개수 세기 C (0) | 2024.05.15 |