Advertisement
edutedu

pasareasca

Apr 2nd, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char a[100], b[100]="";
  8. int i, n, j=0;
  9. cout<<"Introduceti sirul: ";
  10. cin.get(a,100);
  11. n=strlen(a);
  12. for(i=0; i<n; i++)
  13. {
  14. if(strchr("aeiou",a[i])!=0)
  15. {
  16. b[j]=a[i];
  17. b[j+1]='p';
  18. b[j+2]=a[i];
  19. j=j+3;
  20. }
  21. else
  22. {
  23. b[j]=a[i];
  24. j++;
  25. }
  26. }
  27. cout<<b;
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement