Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. ifstream f("BAC.TXT");
  8. int n, v[100], a;
  9. f >> n;
  10. for(int i=1;i<=n;i++) f >> v[i];
  11. f >> a;
  12. for(int i=1;i<=n;i++) if(a==v[i]){
  13. cout << "DA";
  14. return 0;
  15. }
  16. cout << "NU";
  17. f.close();
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement