Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 9th, 2020 140 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. #include<array>
  3. #include<vector>
  4. #include<stdlib.h>
  5. #include<time.h>
  6. #include<string.h>
  7. #include<sstream>
  8. #include<list>
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13.     string input;
  14.     getline(cin, input);
  15.  
  16.     istringstream inputStream(input);
  17.     int numbers;
  18.     list<int>myList;
  19.     while (inputStream >> numbers)
  20.     {
  21.         myList.push_back(numbers);
  22.     }
  23.    
  24.     cout << "Number: ";
  25.     int numberToCheck;
  26.     cin >> numberToCheck;
  27.  
  28.     bool yes = false;
  29.  
  30.     for (int number : myList)
  31.     {
  32.         if (number == numberToCheck)
  33.         {
  34.             yes = true;
  35.         }
  36.     }
  37.  
  38.     if (yes)
  39.         cout << "Ima go " << endl;
  40.     else
  41.         cout << "Nqma go" << endl;
  42.  
  43.     return 0;
  44. }
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