Hey guess, trying to create a program that asks for how many X's in an input, then displays that many in the output. Here's what I have so far, would I need the count function for this? The instructions say I need a loop.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
#include <string>
usingnamespace std;
int main ()
{
int numExs;
cout << "Please enter the numbet of Xs (1-10): " ;
cin >> numExs;
if ((numExs > 0) && (numExs < 10))
// this is where i have to print how many x's they input
else
cout << "Entry is out of range."
}