#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
usingnamespace std;
void guess();
void end();
int main ()
{
guess();
end();
}
void guess()
{
int i =0;
do
{
for( i = 0; i< 9; i++)
{
i++;
int number;
cout <<"Please enter any number except for the number 5"<<endl;
cin >> number;
if (number <= 4 || number >= 6)
{
guess();
}
elseif(number == 5)
{
end();
}
}
}
while(i <= 9);
}
void end()
{
cout <<"I told you to not enter the number 5"<<endl;
abort();
}
how can i make the guess function limited to 10 times and then proceeds to end function?
i have both the do and for loops attempting to do the same thing?