text: Octacontagon Number | C program for above approach ; Finding the nth octacontagon Number ; Driver program to test above function
code: #include <stdio.h> NEW_LINE #include <stdlib.h> NEW_LINE int octacontagonNum ( int n ) { return ( 78 * n * n - 76 * n ) / 2 ; } int main ( ) { int n = 3 ; printf ( "3rd ▁ octacontagon ▁ Number ▁ is ▁ = ▁ % d " , octacontagonNum ( n ) ) ; return 0 ; }