Example #1
0
        static void Main(string[] args)
        {
            CountingClient BMI = new CountingClient();
            
            //Nu ska jag ta in två nummer från användaren, först vikt sen längd.
            //bla bla bla
            Console.WriteLine("Welcome, let´s calculate your BMI \r\nPlease input your weight.");
            var weight = Convert.ToDouble(Console.ReadLine());

            Console.WriteLine("Please insert your height in cm.");
            var height = Convert.ToDouble(Console.ReadLine());

            Console.WriteLine(BMI.Bmi(weight, height));
            Console.ReadKey();

        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            CountingClient BMI = new CountingClient();

            labelResult.Text = BMI.Bmi(Convert.ToDouble(textBoxWeight.Text), Convert.ToDouble(textBoxHeight.Text)).ToString();
        }