Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<array>
- #include<vector>
- #include<stdlib.h>
- #include<time.h>
- #include<string.h>
- #include<sstream>
- #include<list>
- using namespace std;
- int main()
- {
- string input;
- getline(cin, input);
- istringstream inputStream(input);
- int numbers;
- list<int>myList;
- while (inputStream >> numbers)
- {
- myList.push_back(numbers);
- }
- cout << "Number: ";
- int numberToCheck;
- cin >> numberToCheck;
- bool yes = false;
- for (int number : myList)
- {
- if (number == numberToCheck)
- {
- yes = true;
- }
- }
- if (yes)
- cout << "Ima go " << endl;
- else
- cout << "Nqma go" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement