**输入提示信息:"Input a string:"**输入格式要求:"%s" **输出格式要求:"Insert result:%s\n".
参考答案
#include <stdio.h>
#include <string.h>
#define N 100
void Insert(char *s);
int main()
{
char str[N];
printf("Input a string:");
gets(str);
Insert(str);
printf("Insert results:%s\n", str);
return 0;
}
void Insert(char *s)
{
char str[N];
char *t = str;
strcpy(t,s);
for(;*t!='\0';s++,t++)
{
*s = *t;
s++;
*s = ' ';
}
*s = '\0';
}