title: Trouble with my BMI program C#?
body: <p>I am having trouble with my bmi calculator. 
  Here are the details: </p>
  
  <p><strong>Write a program that takes a person's height and
  weight in pounds and returns the body mass index(BMI).
  BMI is defined as the weight, expressed in kilograms,</strong> *<em>divided by the square of the height expressed in meters.</em>*<br>
  <strong>One inch is 0.0254 meters and one pound is
  0.454 kilograms.</strong></p>
  
  <p>This is a windows form app btw.</p>
  
  <p>Well when I am trying to square the height using ^, it gives me an error: Operator '^'...</p>
  
  <p>Here is my code: </p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      //Declare variables.
      decimal heightDecimal ;
      decimal weightDecimal;
      decimal bmiDecimal;
      decimal resultDecimal;
  
      //Get user input.
      heightDecimal = Decimal.Parse(txtHeight.Text);
      weightDecimal = Decimal.Parse(txtWeight.Text);
  
      //Calculations.
      weightDecimal = (Decimal)0.454;
      heightDecimal = (Decimal)0.0254;
      bmiDecimal = weightDecimal / heightDecimal ^ 2;
  
  
  
  
      //Display.
      lblBMI.Text = bmiDecimal.ToString();
  }
  </code></pre>
  
  <p>I am trying to figure out the calculations. I am confused. Can anyone please help me? Thanks.</p>
  
  <p><strong>Tested what everyone said. I got some weird numbers. I started it and I put 5 for my height and 100 for my weight(random) and I got 700? Are my calculations wrong?</strong> </p>