Advertisement
MargaritaOwl

Factor

May 14th, 2016
64
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. int main()
  6. {
  7. setlocale(LC_ALL, "rus");
  8.  
  9. unsigned long n, i = 2, j = 1;
  10. cout<<"Введите N!(0<N<34) -> ";
  11. cin>>n;
  12. for (; i <= n; i++)
  13. j *= i;
  14. cout<<n<<"! = "<<j<<'\n';
  15. system("pause");
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement