Check Membership with count
easyQuestion 457Write a function bool contains(const set<int>& s, int x) that returns true if x is stored in the set s and false otherwise. Use s.count(x).
The test prints found when your function returns true and not found when it returns false.
Do NOT write a main function.
Expected output
found not found
= newline. The output ends with a newline, so print one after the last line.
Hints2 available
Sign in to use hintsTopics
STL ContainersSets
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.