Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DailyCalorieIntake
- {
- class DailyCalorieIntake
- {
- static void Main()
- {
- double W = double.Parse(Console.ReadLine()) / 2.2D;
- double H = double.Parse(Console.ReadLine()) * 2.54D;
- double A = double.Parse(Console.ReadLine());
- char gender = char.Parse(Console.ReadLine());
- double E = double.Parse(Console.ReadLine());
- double BMR = 0;
- if(gender == 'm')
- {
- BMR = 66.5D + ( 13.75D * W ) + ( 5.003D * H ) - ( 6.755D * A );
- }
- else
- {
- BMR = 655.0 + ( 9.563D * W ) + ( 1.850D * H ) - ( 4.676 * A );
- }
- double DCI = 0;
- if(E < 1)
- {
- DCI = BMR * 1.2D;
- }
- else if(E > 0 && E < 4)
- {
- DCI = BMR * 1.375D;
- }
- else if(E > 3 && E < 7)
- {
- DCI = BMR * 1.55D;
- }
- else if(E > 6 && E < 10)
- {
- DCI = BMR * 1.725D;
- }
- else
- {
- DCI = BMR * 1.9D;
- }
- Console.WriteLine(Math.Floor(DCI));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement