Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int faktoriel(int a)
- {
- if(a==1)
- return 1;
- else
- return a*faktoriel(a-1);
- }
- int main()
- {
- int a;
- cin>>a;
- cout<<faktoriel(a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement