Nonagonal number | CPP Program find first n nonagonal number . ; Function to find nonagonal number series . ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int Nonagonal ( int n ) { for ( int i = 1 ; i <= n ; i ++ ) { cout << i * ( 7 * i - 5 ) / 2 ; cout << " ▁ " ; } } int main ( ) { int n = 10 ; Nonagonal ( n ) ; return 0 ; }