8000 [기초-1차원배열] 이상한 출석 번호 부르기1 · hellonayeon/c-cpp@3838c2d · GitHub
[go: up one dir, main page]

Skip to content

Commit 3838c2d

Browse files
committed
[기초-1차원배열] 이상한 출석 번호 부르기1
1 parent 937bf15 commit 3838c2d

File tree

1 file changed

+18
-0
lines changed
  • CodeUp C언어 기초 100제

1 file changed

+18
-0
lines changed

CodeUp C언어 기초 100제/1093.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include <stdio.h>
2+
3+
int main() {
4+
int num[24] = {};
5+
int n, idx;
6+
int i;
7+
8+
scanf("%d", &n);
9+
10+
while (n-- > 0) {
11+
scanf("%d", &idx);
12+
num[idx]++;
13+
}
14+
15+
for (i=1; i<24; i++) {
16+
printf("%d ", num[i]);
17+
}
18+
}

0 commit comments

Comments
 (0)
0