#include<iostream>
using namespace std;
void increasingseq(int first,string last,int n){
if(n==0){
cout<<last<<" ";
return;
}
else{
for(int i=first;i<=9;i++){
string str = last + to_string(i);
increasingseq(i+1,str,n-1);
}
}
}
int main(){
int n;
cin>>n;
increasingseq(0,"",n);
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: