include stdio include stdlib include string include conio int main cha

 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
int main()
{ char s[]=":ikiki: sgsdfg ;sdfg; sfdg sdfg,sdfg sdfg sfdg sdfg sdfg sdfgsdf\0",buf[150]="\0",bufpr[100]="\0",bufdv[100]="\0",buftz[100]="\0",bufzap[100]="\0",buft[100]="\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)
switch (sym)
{
case '.':
strcat (buft, buf);
strcat (buft, " \0");
break;
case ' ':
strcat (bufpr, buf);
strcat (bufpr, " \0");
break;
case ';':
strcat (buftz, buf);
strcat (buftz, " \0");
break;
case ':':
strcat (bufdv, buf);
strcat (bufdv, " \0");
break;
case ',':
strcat (bufzap, buf);
strcat (bufzap, " \0");
break;
}
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("bufpr - %s\n",bufpr);
printf("bufdv - %s\n",bufdv);
printf("buftz - %s\n",buftz);
printf("bufzap - %s\n",bufzap);
printf("buft - %s\n",buft);
printf("\n\n\n");
return 0;}