Advertisement
RusSimona

Varianta76 Sub2 Ex5

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