/
githubmirror
/
CPlusPlusThings
Обзор
Документация
Войти
/
githubmirror
/
CPlusPlusThings
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
practical_exercises/10_day_practice/day2/rec1.cpp
21 строка
286 B
zhangxing
support bazel complie this project and format code.
30 мар 2024, 17:00
30 мар 2024, 17:00
3c8a3f2
Код
Авторство
О чём код?
/* 递归1.cpp */ #include <iostream> using namespace std; int f(int n); int main(int argc, char const *argv[]) { cout << "input x:"; int x; cin >> x; cout << f(x) << endl; return 0; } int f(int n) { if (n == 0) { return 1; } else { return n * f(n - 1); } }