namespace _2024._03._27
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void CheckButton_Click(object sender, EventArgs e)
        {
            if (MaleRadioButton.Checked)
            {
                double kg = Convert.ToDouble(WeightTextBox.Text);
                double m = Convert.ToDouble(HeightTextBox.Text) / 100;
                double bmivalue = Math.Round(kg / (Math.Pow(m, 2)), 2);
                BMIValueLabel.Text = $"A BMI értéked: {bmivalue}";

                switch (bmivalue)
                {
                    case double n when n < 18.1:
                        ConditionLabel.Text = "Állapotod: Sovány";
                        break;
                }
            }
        }
    }
}