Listing 8

  bool doSelection(int data){
    bool result;
    //Begin selection structure
    if(data % 2 == 0){
      result = true;
    }else{
      result = false;
    }//end else
    //End selection structure
    
    return result;
  }//end doSelection
  
Listing 8