Andrei_Muresan

V79

Nov 17th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. char s1[300];
  5. int main()
  6. {
  7. int i,ok=0,j;
  8. cin.getline(s1,100);
  9. for (i=0;i<strlen(s1);i++)
  10. {
  11. if (strchr("aeiou",s1[i])!=0)
  12. {
  13. for (j=strlen(s1);j>1;j--)
  14. {
  15. s1[j+1]=s1[j];
  16. }
  17. s1[i+1]='*';
  18. i++;
  19. }
  20. }
  21. for (i=0;i<strlen(s1);i++)
  22. {
  23. if (strchr("*",s1[i])!=0)
  24. {
  25. ok=1;
  26. }
  27. }
  28. if (ok==0)
  29. {
  30. cout<<"FARA VOCALE";
  31. }
  32. else
  33. {
  34. cout<<s1;
  35. }
  36. }
Add Comment
Please, Sign In to add comment