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