Hendecagonal number | Function to find Hendecagonal number ; Formula to calculate nth Hendecagonal number ; Driver Code
< ? php function hendecagonal_num ( $ n ) { return ( 9 * $ n * $ n - 7 * $ n ) / 2 ; } $ n = 3 ; echo $ n , " th ▁ Hendecagonal ▁ number : ▁ " ; echo hendecagonal_num ( $ n ) ; echo " STRNEWLINE " ; $ n = 10 ; echo $ n , " th ▁ Hendecagonal ▁ number : ▁ " ; echo hendecagonal_num ( $ n ) ; ? >