Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <stdio.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. char a[52],b[52]="";
  10. int n,i,x;
  11. gets(a);
  12. n=strlen(a);
  13. for(i=0;i<n;i++)
  14. {
  15. x=(int)(a[i+1]-48);
  16. while(x)
  17. {
  18. strcat(b,(char*)(a[i]));
  19. x--;
  20. }
  21. }
  22. puts(b);
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement