コード例 #1
0
        public string Bmi()
        {
            var bmi = new BodyMassIndex(this.weight, this.height);

            if (bmi.UnderWeight())
            {
                return("You are under weight. You should see your doctor.");
            }
            else if (bmi.OverWeight())
            {
                return("You are over weight. You should see your doctor.");
            }

            return("You are in the correct weight range.");
        }
コード例 #2
0
        public string Bmi()
        {
            var bmi = new BodyMassIndex(this.weight, this.height);
            
            if (bmi.UnderWeight())
            {
                return "You are under weight. You should see your doctor.";
            }
            else if (bmi.OverWeight())
            {
                return "You are over weight. You should see your doctor.";
            }

            return "You are in the correct weight range.";
        }