private void buttonBMI_Click(object sender, EventArgs e) { var weight = int.Parse(textBoxWeight.Text); var length = double.Parse(textBoxLength.Text); BMIClient bmi = new BMIClient(); labelBMI.Text = bmi.CalculateBMI(weight, length); }
private void buttonBMI_Click(object sender, EventArgs e) { var weight = int.Parse(textBoxWeight.Text); var length = double.Parse(textBoxLength.Text); BMIClient bmi = new BMIClient(); labelBMI.Text = bmi.CalculateBMI(weight, length); }
static void Main(string[] args) { Console.WriteLine("Skriv in din vikt: "); var weight = int.Parse(Console.ReadLine()); Console.WriteLine("Skriv in din längd i meter: "); var length = double.Parse(Console.ReadLine()); BMIClient bmi = new BMIClient(); Console.WriteLine(bmi.CalculateBMI(weight, length)); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("Skriv in din vikt: "); var weight = int.Parse(Console.ReadLine()); Console.WriteLine("Skriv in din längd i meter: "); var length = double.Parse(Console.ReadLine()); BMIClient bmi = new BMIClient(); Console.WriteLine(bmi.CalculateBMI(weight, length)); Console.ReadLine(); }