Advertisement
SelinD

Untitled

Jun 21st, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. #include<cstring>
  4. using namespace std;
  5. ifstream fin("bac.txt.cpp");
  6. char s[101],t[101],v[]="aeiouAEIOU";
  7.  
  8. void elimin(char s[101],char t[101])
  9. {
  10. int i;
  11. strcpy(t," ");
  12. for(i=0;i<strlen(s);i++)
  13. {
  14. if(strchr(v,s[i])==0) //nu e voc
  15. {
  16. strncat(t,s+i,1);
  17. }
  18. }
  19. }
  20.  
  21. int main()
  22. {
  23. while(fin>>s)
  24. {
  25. cout<<s<<" ";
  26. elimin(s,t);
  27. cout<<t;
  28. cout<<endl;
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement