Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int rez [7];
  8.  
  9. for(int i = 0; i<7 ; i++){
  10.  
  11. cin>>rez[i];
  12. }
  13.  
  14.  
  15.  
  16. int grid[30];
  17. for(int i = 0; i<30; i++){
  18.  
  19. cin>>grid[i];
  20. }
  21. bool dt;
  22. for(int i = 0;i<7;i++){
  23.  
  24. for(int j= 0;j<30;j++){
  25.  
  26. if(rez[i]==grid[j]){
  27.  
  28. dt=true;
  29.  
  30. }else{
  31.  
  32. dt=false;
  33.  
  34. }
  35. }
  36. }
  37.  
  38. if(dt==true){
  39.  
  40. cout<<"DA";
  41. return 0;
  42. }else{
  43.  
  44. cout<<"NE";
  45. return 0;
  46. }
  47.  
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement