Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. ifstream df("U1.txt");
  9. ofstream rf("U1rez.txt");
  10. int n;
  11.  
  12. int a[10000],i,ind=0;
  13.  
  14. df>>n;
  15.  
  16. for(i=1;i<=n;i++)
  17. {
  18. df>>a[i];
  19. }
  20. for(i=1;i<=n;i++)
  21. {
  22. if(a[i]%2==0)
  23. {
  24. ind=ind+1;
  25. }
  26. }
  27.  
  28. if(ind>1) rf<<"NELYGINIS"<<endl;
  29. else rf<<"LYGINIS"<<endl;
  30.  
  31.  
  32.  
  33.  
  34. df.close();
  35. rf.close();
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement