/**
 * This function diagnoses the health issues of two pets and returns a list of common health issues.
 *
 * @param pet1 string representing the name of the first pet
 * @param pet2 string representing the name of the second pet
 * @return list a list of common health issues
 *
 * The function uses the NOT operator and the Continue statement to identify the common health issues among pets.
 *
 * Note: The function assumes that the health issues are stored in two separate lists named 'healthIssuesPet1' and 'healthIssuesPet2'.
 */
fun diagnoseHealthIssues(pet1: String, pet2: String): List<String> {

    val healthIssuesPet1 = listOf("cough", "diarrhea", "skin rash", "fever", "vomiting")
    val healthIssuesPet2 = listOf("sneezing", "diarrhea", "eye infection", "fever", "hair loss")
    
    val commonHealthIssues = mutableListOf<String>()
    
    for (issuePet1 in healthIssuesPet1) {
        for (issuePet2 in healthIssuesPet2) {
            if (issuePet1 == issuePet2) {
                commonHealthIssues.add(issuePet1)
                break
            }
        }
    }
    
    return commonHealthIssues
}
/**
 * This function diagnoses the health issues of two pets and returns a list of common health issues.
 *
 * @param pet1 string representing the name of the first pet
 * @param pet2 string representing the name of the second pet
 * @return list a list of common health issues
 *
 * The function uses the NOT operator and the Continue statement to identify the common health issues among pets.
 *
 * Note: The function assumes that the health issues are stored in two separate lists named 'healthIssuesPet1' and 'healthIssuesPet2'.
 */
fun diagnoseHealthIssues(pet1: String, pet2: String): List<String> {
/**
 * This function diagnoses the health issues of two pets and returns a list of common health issues.
 *
 * @param pet1 string representing the name of the first pet
 * @param pet2 string representing the name of the second pet
 * @return list a list of common health issues
 *
 * The function uses the NOT operator and the Continue statement to identify the common health issues among pets.
 *
 * Note: The function assumes that the health issues are stored in two separate lists named 'healthIssuesPet1' and 'healthIssuesPet2'.
 */
fun diagnoseHealthIssues(pet1: String, pet2: String): List<String> {

    val healthIssuesPet1 = listOf("cough", "diarrhea", "skin rash", "fever", "vomiting")
    val healthIssuesPet2 = listOf("sneezing", "diarrhea", "eye infection", "fever", "hair loss")
    
    val commonHealthIssues = mutableListOf<String>()
    
    for (issuePet1 in healthIssuesPet1) {
        for (issuePet2 in healthIssuesPet2) {
            if (issuePet1 == issuePet2) {
                commonHealthIssues.add(issuePet1)
                break
            }
        }
    }
    
    return commonHealthIssues
}