Dodecahedral number | Function to find dodecahedral number ; Formula to calculate nth dodecahedral number and return it into main function . ; Drivers Code ; print result
< ? php function dodecahedral_num ( $ n ) { return $ n * ( 3 * $ n - 1 ) * ( 3 * $ n - 2 ) / 2 ; } $ n = 5 ; echo $ n , " th ▁ Dodecahedral ▁ number : ▁ " ; echo dodecahedral_num ( $ n ) ; ? >