Advertisement
Josif_tepe

Untitled

Apr 20th, 2024
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int fakotoriel(int n) {
  5.     int res = 1;
  6.     for(int i = 1; i <= n; i++) {
  7.         res *= i;
  8.     }
  9.     return res;
  10. }
  11. int main() {
  12.     cout << fakotoriel(5) << endl;
  13.     return 0;
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement