You are on page 1of 2

#include <iostream>

#include <string.h>
#include <fstream>
using namespace std;
void sterge_voc(char s[71])
{
int i=0;
char voc[6]="AEIOU";
while(i<strlen(s))
if(strchr(voc,s[i])!=0)
strcpy(s+i,s+i+1);
else i++;
cout<<s;
}
int main()
{ char a[71],s[71],*p,b[71],voc[6]="AEIOU";
int i,k=0;
ifstream f("atestat.in");
ofstream g("atestat19.out");
f.get(s,71);
strcpy (a,s);
for(i=0;i<strlen(a)-1;i++)
if(a[i]!=' '&&a[i+1]==' ')
a[i]=a[i]+32;
a[strlen(a)-1]=a[strlen(s)-1]+32;
cout<<a<<endl;
sterge_voc(s);
p=strtok(b," ");
while(p!=0)
{
if(strchr(voc,p[1])!=0)
{g<<p<<" ";k++;}
p=strtok(NULL," ");}
if(k==0)g<<"nu exista astfel de cuvinte";
f.close(); g.close();

return 0;

You might also like