SHARE
TWEET

Untitled

a guest Oct 24th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int x,y,ok=0;
  9.     fstream f("date.in");
  10.     fstream g("date.out");
  11.     f>>x;
  12.     while(f>>y)
  13.     {
  14.         if(x%2==0&&y%2==0)
  15.         {
  16.             ok=1;
  17.             g<<x<<" "<<y<<endl;
  18.         }
  19.         x=y;
  20.     }
  21.     if(ok!=1)
  22.          g<<"nu s elemente pare";
  23.     f.close();
  24.     g.close();
  25.     return 0;
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top