ZXC/Source1.cpp

8 lines
188 B
C++
Raw Normal View History

2024-12-15 21:23:40 +04:00
#include <iostream>
int factorial(int n) {
return (n == 1 || n == 0) ? 1 : n * factorial(n - 1);
}
2024-12-15 21:25:16 +04:00
int main() <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ial: " << factorial(num) << std::endl;
2024-12-15 21:23:40 +04:00
return 0;
}