You are viewing our Forum Archives. To view or take place in current topics click here.
how to make a Temperature Converter in vb
Posted:

how to make a Temperature Converter in vbPosted:

xboxxhackers
  • Junior Member
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
#2. Posted:
Chunkuh
  • TTG Senior
Status: Offline
Joined: Mar 21, 201113Year Member
Posts: 1,659
Reputation Power: 111
Status: Offline
Joined: Mar 21, 201113Year Member
Posts: 1,659
Reputation Power: 111
I couldn't watch, I just to got too frustrated.
I've never seen a slower typer in my life, seriously.
#3. Posted:
CLK
  • Wise One
Status: Offline
Joined: Jun 12, 201014Year Member
Posts: 531
Reputation Power: 33
Status: Offline
Joined: Jun 12, 201014Year Member
Posts: 531
Reputation Power: 33
@Chunkuh

Going off of this article since I don't know the ratio: [ Register or Signin to view external links. ]


float ToFahrenheit(float CelciusMeasure)
{
return (CelciusMeasure / (9/5)) + 32;
}

float ToCelcius(float FahrenheitMeasure)
{
return (FahrenheitMeasure - 32) * (9/5);
}
#4. Posted:
xboxxhackers
  • Junior Member
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
sorry about the slow typing i never type that slow but it was really dark when i made the video i will up load the code in a few sorry guys
#5. Posted:
xboxxhackers
  • Junior Member
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
here is the code and remember to sub for more thanks

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim FCTemp, Celsius, Fahrenheit As Single
Dim strFCTemp As String
Dim Prompt As String = "Please enter a Fahrenheit or Celsius temperature below"
Do
strFCTemp = InputBox(Prompt, "Fahrenheit Selsius Converter")
If strFCTemp <> "" Then
FCTemp = CSng(strFCTemp)
Celsius = ((FCTemp - 32) / 9) * 5
Fahrenheit = ((FCTemp * 9) / 5) + 32
MsgBox(FCTemp & " Fahrenheit is " & Celsius & " Celsius." & vbCrLf & FCTemp & " Celsius is " & Fahrenheit & " Fahrenheit.", , "Converted Temperature")
End If
Loop While strFCTemp <> ""
Me.Close()
End Sub
End Class
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.