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

Skip to content

Commit a94a6d6

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

File tree

1 file changed

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

1 file changed

+16
-0
lines changed

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

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

0 commit comments

Comments
 (0)
0