Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- #include<cstring>
- using namespace std;
- ifstream fin("bac.txt.cpp");
- char s[101],t[101],v[]="aeiouAEIOU";
- void elimin(char s[101],char t[101])
- {
- int i;
- strcpy(t," ");
- for(i=0;i<strlen(s);i++)
- {
- if(strchr(v,s[i])==0) //nu e voc
- {
- strncat(t,s+i,1);
- }
- }
- }
- int main()
- {
- while(fin>>s)
- {
- cout<<s<<" ";
- elimin(s,t);
- cout<<t;
- cout<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement