Program to find Star number | C ++ program to find star number ; Returns n - th star number ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int findStarNum ( int n ) { return ( 6 * n * ( n - 1 ) + 1 ) ; } int main ( ) { int n = 3 ; cout << findStarNum ( n ) ; return 0 ; }