Download presentation
Presentation is loading. Please wait.
Published byJean-Charles Jean-Bernard Morel Modified over 5 years ago
1
main() { int fact; fact = Factorial(4); } main fact
2
n 4 int Factorial(int n) { if (n == 0) return (1); else
return (n * Factorial(n-1)); } main Factorial n 4
3
n 3 int Factorial(int n) { if (n == 0) return (1); else
return (n * Factorial(n-1)); } main Factorial Factorial n 3
4
n int Factorial(int n) { if (n == 0) return (1); else
return (n * Factorial(n-1)); } main Factorial Factorial Factorial Factorial Factorial n
5
1 n 1 int Factorial(int n) { if (n == 0) return (1); else
return (n * Factorial(n-1)); } 1 main Factorial Factorial Factorial Factorial n 1
6
1 n 2 int Factorial(int n) { if (n == 0) return (1); else
return (n * Factorial(n-1)); } 1 main Factorial Factorial Factorial n 2
7
2 n 3 int Factorial(int n) { if (n == 0) return (1); else
return (n * Factorial(n-1)); } 2 main Factorial Factorial n 3
8
6 n 4 int Factorial(int n) { if (n == 0) return (1); else
return (n * Factorial(n-1)); } 6 main Factorial n 4
9
main() { int fact; fact = Factorial(4); } 24 main fact
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.