Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <algorithm>
- #include <cmath>
- #include <string>
- #include <vector>
- #include <set>
- #include <ctime>
- #include <list>
- #include <stack>
- #include <iterator>
- #include <fstream>
- using namespace std;
- int check(string a) {
- string alfabet = "eyuioa";
- int b = 0;
- for (int i = 0; i < alfabet.size(); i++) {
- if (a[0] == alfabet[i]) b++;
- if (a[a.size() - 1] == alfabet[i]) b++;
- }
- return b;
- }
- int main()
- {
- string line;
- ifstream in("D:\\inp.txt");
- ofstream out;
- out.open("D:\\outp.txt");
- if (in.is_open()) {
- while (getline(in, line)) {
- if (check(line) == 2) {
- cout << line << "\n";
- out << line << "\n";
- }
- }
- }
- in.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement