VB.Net/Language Basics/Decimal

Материал из VB Эксперт
Перейти к: навигация, поиск

Convert String to Decimal

Imports System

Public Class MainClass
   Shared Sub Main()
        Dim cdeg As Decimal
        Console.Write("Enter the degrees in centigrade...")
        cdeg = CDec(Console.ReadLine())
        Dim fdeg As Decimal
        fdeg = (((9@ / 5) * cdeg) + 32)
        Console.WriteLine(cdeg & " is " & fdeg & " degrees Fahrenheit.")
   End Sub 
End Class