0% found this document useful (0 votes)
60 views1 page

Practica 7

This program converts between Celsius and Fahrenheit temperatures. The user enters a temperature in either Celsius or Fahrenheit in a text box. When the conversion button is clicked, the program performs the calculation and displays the result in the opposite temperature scale in another text box. Additional buttons allow clearing all text boxes or closing the program.

Uploaded by

jd3_orozco7776
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views1 page

Practica 7

This program converts between Celsius and Fahrenheit temperatures. The user enters a temperature in either Celsius or Fahrenheit in a text box. When the conversion button is clicked, the program performs the calculation and displays the result in the opposite temperature scale in another text box. Additional buttons allow clearing all text boxes or closing the program.

Uploaded by

jd3_orozco7776
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PROGRAMA PARA CONVERTIR LOS GRADOS CENTIGRADOS A FARENHEIT Y VICEVERSA

Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim centigrados, resultado1 As Decimal centigrados = TextBox1.Text resultado1 = (centigrados * 1.8) + 32 TextBox4.Text = resultado1 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim farenheit, resultado2 As Decimal farenheit = TextBox2.Text resultado2 = (farenheit - 32) * 5 / 9 TextBox3.Text = resultado2 End Sub End Class

You might also like