Advertisement
Cucura_Georgiana

Varianta 39, Subiect 2

Nov 18th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. 5. #include<iostream>
  2. #include<cstring>
  3. using namespace std;
  4. char x[300], *p, R[300];
  5. int main()
  6. {
  7.     cin.getline(x, 300);
  8.     p=strtok(x, " ");
  9.     while(p!=0)
  10.     {
  11.         if(strchr("aeiou", p[0])!=0)
  12.         {
  13.             strcat(R, strrev(p));
  14.             strcat(R, " ");
  15.         }
  16.         else
  17.         {
  18.             strcat(R, p);
  19.             strcat(R, " ");
  20.         }
  21.         p=strtok(0, " ");
  22.     }
  23.     cout<<R;
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement