SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #include<iostream>
  3. using namespace std;
  4.  
  5. int silnia (int x)
  6. {
  7.  
  8.     if (x == 0) return 1;
  9.     else return x*silnia(x-1);
  10. }
  11.  
  12. int main()
  13. {
  14. int a;
  15. cout << "Obliczanie silni z ";
  16. cout << "Podaj liczbe: ";
  17. cin >> a;
  18. cout << a << "! = " << silnia(a) << endl;
  19. return 0;
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top