Represent ( 2 / N ) as the sum of three distinct positive integers of the form ( 1 / m ) | C ++ implementation of the approach ; Function to find the required fractions ; Base condition ; For N > 1 ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void find_numbers ( int N ) { if ( N == 1 ) { cout << -1 ; } else { cout << N << " ▁ " << N + 1 << " ▁ " << N * ( N + 1 ) ; } } int main ( ) { int N = 5 ; find_numbers ( N ) ; return 0 ; }