AleksandarArkan

R-Calcola il fattoriale

Mar 27th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.13 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int fattoriale (int n){
  5.     if(n!=0)
  6.         return n*fattoriale(n-1);
  7.     else
  8.         return 1;
  9. };
Advertisement
Add Comment
Please, Sign In to add comment