Find an N | C ++ implementation of the above approach ; Function to print the required permutation ; Driver code
#include <iostream> NEW_LINE using namespace std ; void findPermutation ( int N ) { for ( int i = 1 ; i <= N ; i ++ ) cout << i << " ▁ " ; cout << endl ; } int main ( ) { int N = 5 ; findPermutation ( N ) ; return 0 ; }