#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char* insert(char *str,char *substr,int n);
char* insert(char *str,char *substr,int n)
{
int j=0;
char *news,*begin;
news=(char *)malloc(strlen(str)+2+strlen(substr));
begin=news;
for(int i=0;i<n;i++)
( 填空 )
while(*substr!=0)
( 填空 )
while(*str!=0)
( 填空 )
( 填空 )
strcpy(str,begin);
free(begin);
( 填空 )
}
int main()
{
char str[80];
char substr[80];
int n;
gets(str);gets(substr);
scanf("%d",&n);
printf("%s",insert(str,substr,n));
}
森栏
相关分类