/**
 * This function calculates the appropriate prescription for a patient based on their age and gender.
 *
 * @param patientAge The age of the patient.
 * @param patientGender The gender of the patient ('male' or 'female').
 * @return The recommended prescription for the patient.
 */
fun calculatePrescription(patientAge: Int, patientGender: String): String {

    var prescription = ""

    // Check if the patient is an adult
    if (patientAge >= 18) {
        // Check if the patient is a male
        if (patientGender == "male") {
            prescription += "Prescribe medication A."
        } else {
            prescription += "Prescribe medication B."
        }
    } else {
        // Check if the patient is a child
        // Check if the patient is a male
        if (patientGender == "male") {
            prescription += "Prescribe medication C."
        } else {
            prescription += "Prescribe medication D."
        }
    }

    return prescription
}
/**
 * This function calculates the appropriate prescription for a patient based on their age and gender.
 *
 * @param patientAge The age of the patient.
 * @param patientGender The gender of the patient ('male' or 'female').
 * @return The recommended prescription for the patient.
 */
fun calculatePrescription(patientAge: Int, patientGender: String): String {
/**
 * This function calculates the appropriate prescription for a patient based on their age and gender.
 *
 * @param patientAge The age of the patient.
 * @param patientGender The gender of the patient ('male' or 'female').
 * @return The recommended prescription for the patient.
 */
fun calculatePrescription(patientAge: Int, patientGender: String): String {

    var prescription = ""

    // Check if the patient is an adult
    if (patientAge >= 18) {
        // Check if the patient is a male
        if (patientGender == "male") {
            prescription += "Prescribe medication A."
        } else {
            prescription += "Prescribe medication B."
        }
    } else {
        // Check if the patient is a child
        // Check if the patient is a male
        if (patientGender == "male") {
            prescription += "Prescribe medication C."
        } else {
            prescription += "Prescribe medication D."
        }
    }

    return prescription
}