Advertisement
35657

Untitled

Mar 22nd, 2024
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. #include <iostream>
  7.  
  8. using namespace std;
  9.  
  10. int Fact(int N) {
  11.     if (N == 1) {
  12.         return 1;
  13.     }
  14.     return N * Fact(N - 1);
  15. }
  16.  
  17.  
  18. int main() {
  19.     setlocale(LC_ALL, "ru");
  20.  
  21.     cout << Fact(6) << endl;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement