Calculate Basal Metabolic Rate (BMR) in C# – Programming, Pseudocode Example, C# Programming Example
C# C# Console

Calculate Basal Metabolic Rate (BMR) in C#

To calculate your basal metabolic rate (BMR), you will need to know your weight in kilograms, your height in meters, and your age in years. There are several formulas that can be used to calculate BMR, but the most widely used is the Harris-Benedict equation:

For men: BMR = 66 + (13.7 x weight in kg) + (5 x height in cm) – (6.8 x age in years)

For women: BMR = 655 + (9.6 x weight in kg) + (1.8 x height in cm) – (4.7 x age in years)

Please note that the BMR represents the minimum number of calories that your body needs to function while at rest. To determine your total daily caloric needs, you will need to factor in your activity level.

Here is an example of how you could write a function to calculate the BMR in C#:

You can then call this function by passing in the appropriate values for weight, height, age, and gender, like this:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.