#include <iostream>
using namespace std;
int sum = 1;
int factorial(int N) {
if (N == 0) {
cout << sum;
return 1;
}
else {
sum *= N;
return factorial(N - 1);
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int N; cin >> N;
factorial(N);
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 10953๋ฒ - A+B-6 (0) | 2021.10.25 |
---|---|
[๋ฐฑ์ค,c++] 10951๋ฒ - A+B-4 (0) | 2021.10.25 |
[๋ฐฑ์ค,c++] 10950๋ฒ - A+B-3 (0) | 2021.10.25 |
[๋ฐฑ์ค,c++] 10871๋ฒ - X๋ณด๋ค ์์ ์ (0) | 2021.10.25 |
[๋ฐฑ์ค,c++] 10870๋ฒ - ํผ๋ณด๋์น ์5 (0) | 2021.10.25 |
[๋ฐฑ์ค,c++] 10867๋ฒ - ์ค๋ณต ๋นผ๊ณ ์ ๋ ฌํ๊ธฐ (0) | 2021.10.25 |
๋๊ธ