Advertisement
Vprento

Двоен факториел

Nov 27th, 2017
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2. int dvoenFaktoriel(int n) {
  3. if(n<1)
  4.     return 1;
  5.     else
  6.         return n*dvoenFaktoriel(n-2);
  7. }
  8. int main(){
  9. int n;
  10. scanf("%d", &n);
  11. printf("%d", dvoenFaktoriel(n));
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement