print all substrings in c 2b 2b

Solutions on MaxInterview for print all substrings in c 2b 2b by the best coders in the world

showing results for - "print all substrings in c 2b 2b"
Kaelyn
01 Oct 2020
1void printsubstr(string s, int n){
2    for(int i=0;i<n;i++){
3        for(int j=1;j<=n-i;j++){
4            cout<<s.substr(i,j)<<endl;
5        }
6    }
7}
similar questions
queries leading to this page
print all substrings in c 2b 2b