Josif_tepe

Untitled

Feb 5th, 2026
79
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.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8.    int n;
  9.    cin >> n;
  10.  
  11.    int faktoriel = 1;
  12.  
  13.    for(int i = 1; i <= n; i++) {
  14.     faktoriel *= i;
  15.    }
  16.  
  17.     cout << faktoriel <<endl;
  18.  
  19.     return 0;
  20. }
  21.  
  22.  
  23.  
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment