SHARE
TWEET

Untitled

a guest Oct 17th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4. ifstream we;
  5. ofstream wy;
  6. int a, x, wynik1, wynik2;
  7.  
  8. int main()
  9. {
  10.     we.open("przyklad.txt");
  11.     wy.open("wyniki 6.1.txt");
  12.  
  13.     for ( int i = 0; i < 1000; i++ )
  14.     {
  15.         we >> a;
  16.         a/=10;
  17.         x%=a;
  18.  
  19.         if ( x % 2 == 0 )
  20.             wynik1++;
  21.         else wynik2++;
  22.     }
  23.     cout << wynik1 << " " << wynik2;
  24.  
  25.     we.close();
  26.     wy.close();
  27. }
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
 
Top