SHARE
TWEET

vasda

a guest Sep 24th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top