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