Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> numbers = {1, 7, 3, 5, 9, 2}; auto it = find(numbers.begin(), numbers.end(), 3); if (it != numbers.end()) { cout << "The number 3 was found!"; } else { cout << "The number 3 was not found."; } return 0; }
The number 3 was found!