Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string.h>
- using namespace std;
- ifstream fin("a.in");
- struct nod
- {
- char a;
- nod *next;
- };
- void addp(nod* & p,char val)
- {
- nod *q;
- q=new nod;
- q->a=val;
- q->next=p;
- p=q;
- }
- void afis(nod *p)
- {
- if(p==0)
- return;
- afis(p->next);
- cout<<p->a;
- }
- int main()
- {
- char s[256];
- fin.getline(s,256);
- int i;
- nod *p;
- p=NULL;
- for(i=0;s[i];i++)
- { if(strchr("aeiouAEIOU",s[i]))
- addp(p,s[i]);
- else
- }
- afis(p);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement