Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("bac.txt");
- int main() {
- int a = -1, b;
- while (fin >> b) {
- if (a != b && b % 2 == 0) {
- cout << b << ' ';
- }
- a = b;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement