/**
 * A nurse needs to calculate the dosage of a medication based on the patient's weight.
 * Write a function that takes in the dose of the medication and the weight of the patient,
 * and returns the total dosage required for the patient.
 *
 * The weight must be a positive integer. The dose variable represents the dosage per kg of weight.
 *
 * Example:
 * calculateDosage(0.5, 70)  // Output: 35.0 (since the patient weighs 70 kg and the dose per kg is 0.5)
 *
 * The function should use a loop to calculate the total dosage required for the patient.
 */
fun calculateDosage(dose: Double, weight: Int): Double {

    var totalDosage = 0.0
    repeat(weight) {
        totalDosage += dose
    }
    return totalDosage
}
/**
 * A nurse needs to calculate the dosage of a medication based on the patient's weight.
 * Write a function that takes in the dose of the medication and the weight of the patient,
 * and returns the total dosage required for the patient.
 *
 * The weight must be a positive integer. The dose variable represents the dosage per kg of weight.
 *
 * Example:
 * calculateDosage(0.5, 70)  // Output: 35.0 (since the patient weighs 70 kg and the dose per kg is 0.5)
 *
 * The function should use a loop to calculate the total dosage required for the patient.
 */
fun calculateDosage(dose: Double, weight: Int): Double {
/**
 * A nurse needs to calculate the dosage of a medication based on the patient's weight.
 * Write a function that takes in the dose of the medication and the weight of the patient,
 * and returns the total dosage required for the patient.
 *
 * The weight must be a positive integer. The dose variable represents the dosage per kg of weight.
 *
 * Example:
 * calculateDosage(0.5, 70)  // Output: 35.0 (since the patient weighs 70 kg and the dose per kg is 0.5)
 *
 * The function should use a loop to calculate the total dosage required for the patient.
 */
fun calculateDosage(dose: Double, weight: Int): Double {

    var totalDosage = 0.0
    repeat(weight) {
        totalDosage += dose
    }
    return totalDosage
}