Advertisement
STANAANDREY

sb3 3 bac2020 t19

May 16th, 2022
607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4. ifstream fin("bac.txt");
  5.  
  6. int main() {
  7.     int a = -1, b;
  8.     while (fin >> b) {
  9.         if (a != b && b % 2 == 0) {
  10.             cout << b << ' ';
  11.         }
  12.         a = b;
  13.     }
  14.     return 0;
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement