Lines Matching refs:Factorial
38 unsigned int Factorial( unsigned int number ) {
39 return number <= 1 ? number : Factorial(number-1)*number;
49 unsigned int Factorial( unsigned int number ) {
50 return number <= 1 ? number : Factorial(number-1)*number;
54 REQUIRE( Factorial(1) == 1 );
55 REQUIRE( Factorial(2) == 2 );
56 REQUIRE( Factorial(3) == 6 );
57 REQUIRE( Factorial(10) == 3628800 );
73 REQUIRE( Factorial(0) == 1 );
74 REQUIRE( Factorial(1) == 1 );
75 REQUIRE( Factorial(2) == 2 );
76 REQUIRE( Factorial(3) == 6 );
77 REQUIRE( Factorial(10) == 3628800 );
85 REQUIRE( Factorial(0) == 1 )
90 Note that we get the actual return value of Factorial(0) printed for us (0) - even though we used a…
95 unsigned int Factorial( unsigned int number ) {
96 return number > 1 ? Factorial(number-1)*number : 1;