Climb n | function return the number of ways ; Driver Code
< ? php function calculateLeaps ( $ n ) { if ( $ n == 0 $ n == 1 ) { return 1 ; } else { $ leaps = 0 ; for ( $ i = 0 ; $ i < $ n ; $ i ++ ) $ leaps += calculateLeaps ( $ i ) ; return $ leaps ; } } echo calculateLeaps ( 4 ) , " STRNEWLINE " ; ? >