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, 2, 7, 5, 3, 5, 9, 2, 5}; int amount = count(numbers.begin(), numbers.end(), 5); cout << "The number 5 appears " << amount << " times"; return 0; }
The number 5 appears 3 times