include stdio include stdlib include string int main void char ikiki s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdio.h.>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char s[]=":ikiki: sgsdfg ;sdfg; sfdg sdfg,sdfg sdfg sfdg sdfg sdfg sdfgsdf\0",buf[150]="\0",buf1[150]="\0",sym;
int i=0,j=0;
while(1)
{
if(s[i]=='.'||s[i]==':'||s[i]==';'||s[i]==' '||s[i]!=','||s[i]=='\0')
{
sym=s[i];
i++;
while(s[i]!='.'&&s[i]!=':'&&s[i]!=';'&&s[i]!=' '&&s[i]!=','&&s[i]!='\0')
{
buf[j]=s[i];
i++;
j++;
}
buf[j]='\0';j=0;//buf[j+2]='\0';
}
if(s[i]==sym){
strcat(buf1,buf);
strcat(buf1," \0");
}
if((s[i-1]=='.'||s[i-1]==':'||s[i-1]==';'||s[i-1]==' '||s[i-1]!=','||s[i-1]=='\0')&&(s[i]=='.'||s[i]==':'||s[i]==';'||s[i]==' '||s[i]!=','||s[i]=='\0'))
i--;
i++;
if(s[i]=='\0') break;
}
printf("%s\t\n",buf1);
system("pause");
return 0;
}