[정올] Language Coder_반복제어문2_형성평가5_code134 (C)
두비니
·2020. 3. 26. 05:01
#include <stdio.h>
int main() {
int n, even = 0, odd = 0;
for (int i = 0; i < 10; i++) {
scanf("%d", &n);
if (n % 2 == 0)
even++;
else
odd++;
}
printf("even : %d\n", even);
printf("odd : %d", odd);
return 0;
}
'Coding_Algorithm > 정올 문제풀이' 카테고리의 다른 글
[정올] Language Coder_반복제어문2_형성평가5_code134 (C) (0) | 2020.03.28 |
---|---|
[정올] Language Coder_반복제어문2_형성평가6_code135 (C) (0) | 2020.03.27 |
[정올] Language Coder_반복제어문2_형성평가4_code133 (C) (0) | 2020.03.25 |
[정올] Language Coder_반복제어문2_자가진단8_code548 (C) (0) | 2020.03.24 |
[정올] Language Coder_반복제어문2_자가진단7_code547 (C) (0) | 2020.03.24 |