Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #include <cstring>
  3.  
  4. using namespace std;
  5.  
  6. int i, n, j;
  7. char cuv[11];
  8. int main()
  9. {
  10. cin>>cuv;
  11. n=strlen(cuv);
  12. for(i=n-1;i>=0;i--)
  13. {
  14. for(j=0;j<=i;j++)
  15. cout<<cuv[j];
  16. cout<<"\n";
  17. }
  18. for(i=0;i<n;i++)
  19. {
  20. for(j=i;j<n;j++)
  21. cout<<cuv[j];
  22. cout<<"\n";
  23. }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement