Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
544f3a48b0 | |||
759d668045 | |||
6c90998eea | |||
7cefc49c79 | |||
80ce43103e |
@ -9,4 +9,11 @@ int main() {
|
|||||||
std::cout << "Factorial: " << factorial(num) << std::endl;
|
std::cout << "Factorial: " << factorial(num) << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
<EFBFBD><EFBFBD><EFBFBD>
|
ëîë
|
||||||
|
#include <iostream>
|
||||||
|
int factorial(int n) {
|
||||||
|
return (n == 1 || n == 0) ? 1 : n * factorial(n - 1);
|
||||||
|
}
|
||||||
|
int main() ûøãâðàãîûâòðàîûðâîàial: " << factorial(num) << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user