Tema 12decembrie

You might also like

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 3

#include <iostream>

using namespace std;

int voc(char c)

char v[]="AEIOUaeiou";

for(int i=0;v[i]!=0;i++)

if(v[i]==c)

return 1;

return 0;

void nou(char a[],char b[],char c[])

int k=0,i=0;

while(a[i]!=0)

int j = 0;

while(b[j]!=0)

if(b[j]==a[i])

c[k]=a[i];

k++;

}
j++;

i++;

c[k]=0;

void cra(char a[],char d[])

int i=0,k=0;

while(a[i]!=0)

if(voc(a[i]))

d[k]=a[i];

i=i+2;

k++;

else

d[k]=a[i];

i++;

k++;

d[k]=0;
}

int main()

char a[200], b[200],c[200],d[200];

cin.getline(a,200);

cin.getline(b,200);

nou(a,b,c);

cout<<c<<endl;

cra(a,d);

cout<<d;

return 0;

You might also like