Advertisement
Josif_tepe

Untitled

Dec 4th, 2022
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. int main() {
  7.     int n;
  8.     cin >> n;
  9.    
  10.     float niza[n];
  11.     for(int i = 0; i < n; i++) {
  12.         cin >> niza[i];
  13.     }
  14.     float x;
  15.     cin >> x;
  16.    
  17.     for(int i = 0; i < n; i++) {
  18.         if(niza[i] == x) {
  19.             cout << "DA" << endl;
  20.             break;
  21.         }
  22.     }
  23.     return 0;
  24. }
  25. /*
  26.  5
  27.  2 3 5 1 8
  28.  8
  29.  
  30.  
  31.  
  32.  **/
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement