subject

Private void btnCalculate_Click(object sender, System. EventArgs e) {
decimal weightInPounds = 0m;
try
{
weightInPounds = Convert. ToDecimal(txtPounds. Text);
if (weightInPounds > 0)
{
decimal weightInKilos = weightInPounds / 2.2m;
lblKilos. Text = weightInKilos. ToString("f2");
}
else
MessageBox. Show("Weight must be greater than 0.", "Entry error");
txtPounds. Focus();
}
catch(FormatException)
{
MessageBox. Show("Weight must be numeric.", "Entry error");
txtPounds. Focus();
}
}
If the user enters 118 in the text box and clicks the Calculate button, what does the code do?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
Which if the following allows you to view and access important information about your documents all in one location
Answers: 3
question
Computers and Technology, 22.06.2019 02:00
6. the is particularly susceptible to the effects of alcohol because it receives a large portion of total blood flow and has a high concentration of neurons. a. heart b. pancreas c. brain d. liver
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Research data that is presented using descriptive language is said to be
Answers: 2
You know the right answer?
Private void btnCalculate_Click(object sender, System. EventArgs e) {
decimal weightInPounds...
Questions
question
World Languages, 29.09.2019 02:30
question
Mathematics, 29.09.2019 02:30
Questions on the website: 13722363