8000 [기초-종합] 여기까지! 이제 그만~ · hellonayeon/c-cpp@1566b41 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1566b41

Browse files
committed
[기초-종합] 여기까지! 이제 그만~
1 parent 8b30ac5 commit 1566b41

File tree

1 file changed

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

1 file changed

+14
-0
lines changed

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

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

0 commit comments

Comments
 (0)
0