Advertisement
Denistod

Untitled

Nov 17th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. using namespace std;
  4. char x[105],y[105],*p,aux[105],r[105];
  5. int main ()
  6. {
  7. int n,m,b,s,i,j,nr=0;
  8. cin.getline(x,105);
  9. p=strtok(x," ");
  10. while(p!=0)
  11. {
  12. for(i=0;i<strlen(p);i++)
  13. {
  14. if(strchr("aeiouAEUIO",x[i])!=0)
  15. {
  16.  
  17. strncpy(r+nr,p+i,1);
  18. nr++;
  19. strcat(r,"*");
  20. nr++;
  21. }
  22. else
  23. {
  24. strncpy(r+nr,p+i,1);
  25. nr++;
  26. }
  27. }
  28. p=strtok(0," ");
  29. strcat(r," ");
  30. nr++;
  31. }
  32. cout<<r;
  33. return 0;
  34. }
  35.  
  36. 79
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement