Advertisement
Josif_tepe

Untitled

Jan 12th, 2023
607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <queue>
  4. using namespace std;
  5.  
  6.  
  7.  
  8. int main() {
  9.     string s;
  10.     cin >> s;
  11.     for(int i = 0; i < s.size(); i++) {
  12.         string tmp = "";
  13.         for(int j = i; j < s.size(); j++) {
  14.             tmp += s[j];
  15.             cout << tmp << endl;
  16.         }
  17.     }
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement