Denistod

Untitled

Nov 18th, 2019
222
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<cstring>
  3. using namespace std;
  4. char x[1001],r[1001];
  5. int main ()
  6. {
  7. int n,m,b,s,i,j;
  8. cin>>x;
  9. for(i=1;i<strlen(x);i++)
  10. {
  11. if(i%2==1)
  12. {
  13. n=x[i]-48;
  14. for(j=1;j<=n;j++)
  15. {
  16. strncat(r,x+i-1,1);
  17. }
  18. }
  19. }
  20. cout<<r;
  21. }
  22. 51
Add Comment
Please, Sign In to add comment