SHARE
TWEET

Untitled

a guest Dec 15th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6. bool temp (int N, int a[]);
  7.  
  8. int main ()
  9. {
  10. ifstream duom("duom.txt");
  11. ofstream rez("rez.txt");
  12. int N, a[3];
  13. cin>>N;
  14. for (int i=0;i<3;i++)
  15. cin>>a[i];
  16. if (temp(N,a))
  17. cout<<"LYGINIS";
  18. else
  19. cout<<"NELYGINIS";
  20. return 0;
  21. }
  22. bool temp (int N, int a[])
  23. {
  24.   int x=0;
  25.   for (int i=0; i<3 ;i++)
  26.  
  27.   {
  28.     if (a[i]% 2!=0)
  29.     x++;
  30.     if (x>1)
  31.     return 1;
  32.   }
  33. return 0;
  34. }
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