For a Button object named btnCalories, write the click event handler to implement the following requirements and

Question:

For a Button object named btnCalories, write the click event handler to implement the following requirements and calculate the number of calories burned during a run:

a. Declare variables named strMilesRan, decCaloriesConsumed, and decMilesRan.

b. Declare a constant named _cdecCaloriesBurnedPerHour and assign it the value 700. (Assume you burn 700 calories for every mile you run.)

c. Allow the user to enter the number of miles she ran today.

d. Convert the number of miles to a Decimal data type.

e. Calculate the number of calories the user burned during her run.

f. Display the result rounded to zero decimal places in a label named lblCaloriesBurned.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: