Saturday, September 17, 2011

Convert what you type to value type

Module Module1

    Sub Main()
        Dim intInput As Integer
        Console.WriteLine("Enter a temperature...")
        intInput = Val(Console.ReadLine())
        If intInput > 75 Then
            Console.WriteLine("Too hot!")
        ElseIf intInput < 55 Then
            Console.WriteLine("Too cold!")
        Else
            Console.WriteLine("Just right!")
        End If
    End Sub

End Module

No comments:

Post a Comment

Explain the different parts that constitute ASP.NET application.

Content, program logic and configuration file constitute an ASP.NET application. Content files Content files include static text, images ...