Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- // wywołanie rekurencyjne (wywołanie funkcji wewnątrz samej siebie)
- long long silnia(int liczba)
- {
- if(liczba == 0)
- return 1;
- return liczba * silnia(liczba - 1);
- }
- int main()
- {
- cout << silnia(13) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement