Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstring>
- using namespace std;
- char x[1001],r[1001];
- int main ()
- {
- int n,m,b,s,i,j;
- cin>>x;
- for(i=1;i<strlen(x);i++)
- {
- if(i%2==1)
- {
- n=x[i]-48;
- for(j=1;j<=n;j++)
- {
- strncat(r,x+i-1,1);
- }
- }
- }
- cout<<r;
- }
- 51
Add Comment
Please, Sign In to add comment