Advertisement
Guest User

vasda

a guest
Sep 24th, 2019
106
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 <fstream>
  3. #include <string.h>
  4. using namespace std;
  5. ifstream fin("a.in");
  6. struct nod
  7. {
  8. char a;
  9. nod *next;
  10. };
  11. void addp(nod* & p,char val)
  12. {
  13. nod *q;
  14. q=new nod;
  15. q->a=val;
  16. q->next=p;
  17. p=q;
  18.  
  19. }
  20.  
  21. void afis(nod *p)
  22. {
  23. if(p==0)
  24. return;
  25. afis(p->next);
  26. cout<<p->a;
  27.  
  28. }
  29. int main()
  30. {
  31. char s[256];
  32. fin.getline(s,256);
  33. int i;
  34. nod *p;
  35. p=NULL;
  36. for(i=0;s[i];i++)
  37. { if(strchr("aeiouAEIOU",s[i]))
  38. addp(p,s[i]);
  39. else
  40.  
  41. }
  42. afis(p);
  43.  
  44.  
  45.  
  46. return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement