Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Module MedicationDosageCalculator
- Sub Main()
- ' Input medication strength and patient weight
- Console.Write("Enter medication strength per kg (mg): ")
- Dim strengthPerKg As Single = Single.Parse(Console.ReadLine())
- Console.Write("Enter patient's weight (kg): ")
- Dim weight As Double = Double.Parse(Console.ReadLine())
- ' Calculate total dosage
- Dim totalDosage As Decimal = CDec(strengthPerKg * weight)
- ' Output formatted dosage
- Console.WriteLine("Total medication dosage: " & totalDosage.ToString("F2") & " mg")
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment