pranjal1805

Basic template

May 16th, 2021
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #include <fstream>
  3. using namespace std;
  4. typedef long long ll;
  5. typedef long double ld;
  6. #define MOD 1000000007
  7. #define endl "\n";
  8. #define pi 3.14159265
  9. int add(int x, int y){return x+y;}
  10. int main()
  11. {
  12.     ios::sync_with_stdio(false);
  13.     cin.tie(0);
  14.    
  15.     ll t;
  16.     cin>>t;
  17.  
  18.     while(t--)
  19.  {
  20.     ll a;
  21.     ll f=1;
  22.     cin>>a;
  23.     for(int i=1;i<=a;i++)
  24.     {
  25.        
  26.         f=f*i;
  27.     }
  28.     cout<<f<<endl;
  29.    
  30.  }
  31.     return 0;  
  32. }
  33.  
  34.  
Advertisement
Add Comment
Please, Sign In to add comment