Dodecagonal number | Java program to find the nth Dodecagonal number ; function for Dodecagonal number ; formula for find Dodecagonal nth term ; Driver Code
import java . util . * ; class GFG { static int Dodecagonal_number ( int n ) { return 5 * n * n - 4 * n ; } public static void main ( String [ ] args ) { int n = 7 ; System . out . println ( Dodecagonal_number ( n ) ) ; n = 12 ; System . out . println ( Dodecagonal_number ( n ) ) ; } }