The following information about the number of calories a person should burn to maintain their weight.
Someone has written a computer program that works out this “base rate” for any given person. It uses the following variables.
• Their gender
• Their weight in kg
• Their height in cm
• Their age
If the user is male, their base rate in calories is equal to:
(10x their weight) + (6x their height) – (5x their age) + 5
If the user is female, their base rate
(10x their weight) + (6x their height) – (5x their age) + 161
Write an algorithm that:
• Asks the user to enter their gender, weight, height and age
• Calculate the base rate using the formula above
• Output the base rate.