I wish to go the route of a maxinum array..
Here, I'm hoping to have a user input length, and then use a FOR statement to prompt the user length times to input numbers into the array... How do I code a FOR statement to fill an array element with the next slot each time?Code:#include <iostream> #include <string> #include <algorithm> int length; int list[100]; int counter; int main() { std::cout << "How many numbers do you wish to input?: "; std::cin >> length; for (counter = 0; counter < length; ++counter) { std::cout << "Number? "; std::cin >> //***ARRAY ELEMENT X } //*** ONCE THE ARRAY IS FILLED WITH THE USER DEFINED AMOUNT, I NEED TO SEARCH THE ARRAY FOR A USER INPUTTED NUMBER, AND OUTPUT HOW MANY TIMES IT IS IN THE ARRAY ***// return (0); }