Hi, so I'm new to coding and I have an assignment where we need to design code for a guessing game involving days months and years. There's more to this but I'm not sure if I'm doing the for loop correctly.
void
GAME::GUESS_DAY()
{
int USER_GUESS=0;
int i;
int FOUND_DAY=0;
int REMAINING_CHANCES;
int RETURN_VALUE=0;
cout<< "CAN YOU GUESS WHICH DAY I WAS BORN," <<NAME<< "?" <<endl;
cout<< " (YOU HAVE " << NOOF_CHANCES << " CHANCES) <<endl;
REMAINING_CHANCES = NOOF_CHANCES -1;
for (i=0; i < NOOF_CHANCES && FOUND_DAY==0; i++)
{
cin>> USER_GUESS;
RETURN_VALUE = CHECK_USER_ENTRY(1, 31, USER_GUESS);
if (RETURN_VALUE == -1)
{
cout<< "error message"<<endl;
}
else if (RETURN_VALUE == 1 && USER_GUESS == SECRET_DAY)
{
cout<<" wow we are born on the same day" <<USER_GUESS_DAY<<endl;
FOUND_DAY;
IM NOT SURE HOW TO END THE LOOP
I WROTE: FOUND_DAY;If there isn't enough information about this let me know