incorrect input is treated as correct :    i made this for an assignment but even if i feed in input out of the desired range i still get the output, for the first section the wrong input is  
shown as wrong but for the second part no matter what i always get output
   

     #include <iostream> 
        #include <stdio.h> 
        #include <iomanip> 
        #include <cstdio> 
        #include <fstream> 
        #include <string> 
        using namespace std;
        bool setupGame(int numberRef, int triesRef);
        
    
    int main(){
      cout<<"hello world";
      setupGame(4,4);
      cout<<"enough";
    }
    
    
    //SETUP GAME FUNCTION
    bool setupGame(int numberRef, int triesRef) { 
     do { 
          cout << "ENTER A NUMBER BETWEEN 1 and 100" << endl; 
          cin >> numberRef;
    cin.clear(); 
    //your code here 
    cout << "You entered: " << numberRef << endl; 
    if (numberRef==-1) { 
       cout << "You do not want to set a number " << endl; 
       cout << "so you stopped the program" << endl;  
    } 
    
    
    else if(numberRef >=1 && numberRef <=100) 
       do { 
         cout << "ENTER TRIES BETWEEN 3 and 7" << endl; 
         cin >> triesRef;
         cin.clear();
         //cin.ignore( '\n');   
         cout<< "You entered: "<< triesRef<< endl; 
         if (triesRef==-1) { 
            cout << "You do not want to set tries. "; 
      cout << "so you stopped the program" << endl;
    } else if(triesRef <= 3 && triesRef >= 7){
      cout<<"Number of tries should be between 3 and 7";
    }
    
       } 
    
    while(numberRef >=1 && numberRef <=100);{ 
     
       return true; }
    } 
       while(triesRef >= 3 && triesRef <= 7);{
    return true;
    } }