Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- #include <fstream>
- #include<string>
- using namespace std;
- int main()
- {
- ifstream fin("input.txt");
- ofstream fout("output.txt");
- string word;
- if (fin.is_open()) {
- do {
- fin >> word;
- if (std::strchr("aeiouyAEIOUY", word[0]) && std::strchr("aeiouyAEIOUY", word[word.length()-1])) {
- fout << word << endl;
- }
- } while (!fin.eof());
- fin.close();
- }
- else cout << "sos";
- fout.close();
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement