T3000

Untitled

Oct 15th, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n,x,y,z,k;
  8.     y=1;
  9.  
  10.     k=z;
  11.     cin>>n;
  12.     for(x=2;x<=n; ++x){
  13.         y=y*x;
  14.     }
  15.     cout<<y<<endl;
  16.  
  17.  
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment