Advertisement
angelavaida27

Var96_SII_Ex5

Nov 17th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. char Nume[25], Prenume[25], Rez[50], Aux[25];
  5. int main ()
  6. {
  7.     int n, i;
  8.     cin>>Nume>>Prenume;
  9.     n=strlen(Prenume);
  10.     for (i=0; i<n; i++)
  11.     {
  12.         if (strchr("aeiouAEIOU", Prenume[i])==0)
  13.         {
  14.             strncat(Rez, Prenume+i, 1);
  15.         }
  16.     }
  17.     strcat(Rez, " ");
  18.     strcat(Rez, Nume);
  19.     cout<<Rez;
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement