Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- int main()
- {
- int times;
- char *s;
- char *k;
- char *str = (char*)malloc(sizeof(char));
- scanf("%s", str);
- int i;
- while( *str != '\0')
- {
- if(isalpha(*str))
- {
- s = str;
- }
- else
- {
- k = str;
- times = atoi(k);
- for(i = 0 ; i < times; i++)
- {
- printf("%c", *s);
- }
- }
- *str++ =='\0';
- }
- printf("\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement