Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am taking a programming class that uses the textbook An Introduction to progra

ID: 3866732 • Letter: I

Question

I am taking a programming class that uses the textbook An Introduction to programming using Visual Basic (10th edition). We have an assignment on page 193 to write code for a Body Mass Index program (#14). I have written the code, but my results are a single number and not a double digit like the book sample values. I am not sure what I am doing wrong. I have tried changing the code, but nothing has resolved the issue. The below code is what I have written. The sample values were 180 for the weight and 72 for the height. The result should be 24, my result came back as 4. Do you have any advice?

Private Sub BtnCalculateBMI_Click(sender As Object, e As EventArgs) Handles BtnCalculateBMI.Click

Dim Weight As Double

Dim Height As Double

Dim BMI As Integer

Weight = CDbl(TxtBoxWeightinpounds.Text)

Height = CDbl(TxtBoxWeightinpounds.Text)

BMI = (703 * Weight) / (Height ^ 2)

Math.Round(BMI)

TxtBoxBMI.Text = CStr(BMI)

End Sub

Explanation / Answer

Class Menu{

Public Static Void main(String [] args)

{

int 180;

float 72;

double dimweight;

double dimheight;

int dimbmi;

void series()

{

Weight = CDbl(TxtBoxWeightinpounds.Text)

Height = CDbl(TxtBoxWeightinpounds.Text)

double BMI = (703 * dimweight) / (dimheight^ 2)

Math.Round(BMI)

TxtBoxBMI.Text = CStr(BMI)

}

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote