100 002
Assignments Done
98.3%
Successfully Done
In June 2021

# Answer to Question #10929 in Visual Basic for APRIL

Question #10929
ned two independent Sub procedures: one to convert a temperature from fahrenheit to Celsius and the other to convert fahrenheit to celsius.
1
2012-11-12T08:18:26-0500
Dim celcius As Decimal = 0D
Dim fahrenheit As Decimal = 0D
Dim f As Decimal
Dim c As Decimal
celcius = Decimal.Parse(celTextBox.Text)
fahrenheit = Decimal.Parse(fahTextBox.Text)
'celcius to farenheit formula:
If celcius &gt; 0 Then
#039; Notice the conversion from our decimal value to String
#039; Before placing it into the textbox
fahTextBox.Text = Convert.ToString(c * 1.8 + 32)
Else
MessageBox.Show(&quot;Enter celcius greater than 0&quot;)
End If
'farenheit to celcius formula:
If fahrenheit &gt; 0 Then
#039; Again we convert from a decimal value to a string before
#039; placing into textbox
celTextBox.Text = Convert.ToString(f - 32 / 1.8)
Else
MessageBox.Show(&quot;Enter fahrenheit greater than 0&quot;)
End If

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!