Print N numbers such that their product is a Perfect Cube | C ++ program to find N numbers such that their product is a perfect cube ; Function to find the N numbers such that their product is a perfect cube ; Loop to traverse each number from 1 to N ; Print the cube of i as the ith term of the output ; Driver Code ; Function Call
#include <bits/stdc++.h> NEW_LINE using namespace std ; void findNumbers ( int N ) { int i = 1 ; while ( i <= N ) { cout << ( i * i * i ) << " ▁ " ; i ++ ; } } int main ( ) { int N = 4 ; findNumbers ( N ) ; }