Hexadecagonal number | Function to calculate hexadecagonal number ; Driver Code
< ? php function hexadecagonalNum ( $ n ) { return ( ( 14 * $ n * $ n ) - 12 * $ n ) / 2 ; } $ n = 5 ; echo $ n , " th ▁ Hexadecagonal ▁ number ▁ : ▁ " ; echo hexadecagonalNum ( $ n ) ; echo " STRNEWLINE " ; $ n = 9 ; echo $ n , " th ▁ Hexadecagonal ▁ number ▁ : ▁ " ; echo hexadecagonalNum ( $ n ) ;