include iostream include stdio include conio include string include cs

 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
#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <cstring>
using namespace std;
int main()
{
setlocale(LC_CTYPE,"Russian");
char ch;
FILE *pf, *ps;
pf=fopen("new1.txt","w");
ps=fopen("new2.txt","w");
cout<<"¬ведите строку\n";
char text[255];
gets(text);
const char separator[]=" \\.,";
const char vowel[]="a e i o u y";
char *ptr=NULL;
ptr=strtok(text,separator);
while (ptr)
{
int k=0;
int a=strlen(vowel);
for(int i=0; i<a+1; i++)
{
if(ptr[0]==vowel[i])
{
fputs(ptr,pf);
k++;break;
}
}
if(k==0)
fputs(ptr, ps);
cout<<ptr<<"\n";
ptr=strtok(0,separator);
}
}