Print N numbers such that their sum is a Perfect Cube | C ++ implementation to find the N numbers such that their sum is a perfect cube ; Function to find the N numbers such that their sum is a perfect cube ; Loop to find the Ith term of the Centered Hexagonal number ; Driver Code ; Function Call
#include <bits/stdc++.h> NEW_LINE using namespace std ; void findNumbers ( int n ) { int i = 1 ; while ( i <= n ) { cout << ( 3 * i * ( i - 1 ) + 1 ) << " ▁ " ; i ++ ; } } int main ( ) { int n = 4 ; findNumbers ( n ) ; }