MeehoweCK

Untitled

Aug 24th, 2019
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     int wynik = 1;
  9.     cin >> n;
  10.     cout << "Podano liczbe " << n << endl;
  11.  
  12.     int i = 1;
  13.     while(i <= n)
  14.     {
  15.         wynik *= i;
  16.         ++i;
  17.     }
  18.  
  19.     cout << wynik << endl;
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment