Char Learn programming Visual Basic (VB.net)

Lesson:

Basic Data Types


Exercise:

Char 18


Objetive:

Write a Visual Basic (VB.net) program to ask the user for three letters and display them in reverse order.


Code:

Imports System
Public Class Exercise49
    Public Shared Sub Main()
        Dim letter, letter2, letter3 As Char
        Console.Write("Enter letter: ")
        letter = Convert.ToChar(Console.ReadLine())
        Console.Write("Enter letter: ")
        letter2 = Convert.ToChar(Console.ReadLine())
        Console.Write("Enter letter: ")
        letter3 = Convert.ToChar(Console.ReadLine())
        Console.WriteLine("{0} {1} {2}", letter3, letter2, letter)
    End Sub
End Class