HOME

Painkiller dosage

Write a program to calculate the dose of painkiller for each user.
You should ask if the user is male or female, is a smoker and if they are pregnant
Males can have 200mg, females 150mg
If the user is a smoker they can have 2x more
If the user is pregnant they can only take half.
Print out the correct dose

There are many ways of writing this algorithm - this version uses nested if's - if statements inside other if statements

HINT: initialise dose to zero *after* you have asked for gender/smoker/pregnant inputs!

Construct the algorithm answer dragging &dropping and reordering lines from the left to the right.

Jumble the blocks! Try your code!