.Atemperature reading in
Fahrenheit degrees is to be read into
the computer and converted into
Celsius degrees, using the formula C =
(5/9)(F –32
Module Module1
Sub Main()
'Get the fahrenheit degrees from the user
Console.Write("Enter the fahrenheit degrees: ")
Dim fahrenheitdegrees As Double = Double.Parse(Console.ReadLine())
'convert into Celsius degrees, using the formula C = (5/9)(F –32
Dim celsiusDegrees As Double = (5 / 9) * (fahrenheitdegrees - 32)
'Display result
Console.Write("Celsius degrees = " + celsiusDegrees.ToString("N"))
Console.ReadLine()
End Sub
End Module
Comments
Leave a comment