Advertisement
dumitreskw

13

Nov 6th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4. char s[11];
  5. int i;
  6. int main(){
  7. int n,j;
  8. cin.get(s,11);
  9. n=strlen(s);
  10. for(i=0;i<=n-1;i++){
  11.  
  12. for(j=0;j<=n-i-1;j++)
  13. cout << s[j];cout << endl;
  14. }
  15.  
  16.  
  17. for(i=0;i<n;i++){
  18.  
  19. for(j=i;j<n;j++)
  20. cout << s[j]; cout << endl;
  21.  
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement