[정올] Language Coder_반복제어문2_자가진단3_code543 (C/Python)
두비니
·2020. 3. 20. 03:28
<C>
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
for (int a = 2; a <= n; a+=2) {
printf("%d ", a);
}
return 0;
}
<Python>
n = int(input())
for i in range(1, n+1):
if i % 2 == 0:
print(i, end=' ')
'Coding_Algorithm > 정올 문제풀이' 카테고리의 다른 글
[정올] Language Coder_반복제어문2_자가진단5_code545 (C) (0) | 2020.03.22 |
---|---|
[정올] Language Coder_반복제어문2_자가진단4_code544 (C/Python) (0) | 2020.03.21 |
[정올] Language Coder_반복제어문2_자가진단2_code542 (C/Python) (0) | 2020.03.19 |
4.8. For: Sum of factorials 풀이 (0) | 2020.03.18 |
[정올] Language Coder_반복제어문2_자가진단1_code541 (C) (0) | 2020.03.18 |