8000 [기초-종합] 수 나열하기1 · hellonayeon/c-cpp@17c0aa0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 17c0aa0

Browse files
committed
[기초-종합] 수 나열하기1
1 parent e672273 commit 17c0aa0

File tree

1 file changed

+15< 8000 /div>
-0
lines changed
  • CodeUp C언어 기초 100제

1 file changed

+15
-0
lines changed

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

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

0 commit comments

Comments
 (0)
0