' Filename: testStringReverse.bas
'
' Compile: vbc testStringReverse.bas
' Execute: testStringReverse
'
' Compile: vbc testStringReverse.bas
' Execute: testStringReverse
Imports System
Class StringReverseApp
Shared Sub Main(ByVal args() As String)
Dim a As String, b As String
a = "Hello, world!"
b = "안녕하세요?"
Dim arr() As Char = a.ToCharArray()
Array.Reverse(arr)
Console.WriteLine(New String(arr))
arr = b.ToCharArray()
Array.Reverse(arr)
Console.WriteLine(New String(arr))
End Sub
End Class
' ===================
' Expected result:
' !dlrow ,olleH
' ?요세하녕안
' ===================
Shared Sub Main(ByVal args() As String)
Dim a As String, b As String
a = "Hello, world!"
b = "안녕하세요?"
Dim arr() As Char = a.ToCharArray()
Array.Reverse(arr)
Console.WriteLine(New String(arr))
arr = b.ToCharArray()
Array.Reverse(arr)
Console.WriteLine(New String(arr))
End Sub
End Class
' ===================
' Expected result:
' !dlrow ,olleH
' ?요세하녕안
' ===================
'프로그래밍 > BASIC' 카테고리의 다른 글
진법(radix) 표 만들기 예제 with Visual Basic (0) | 2009.02.16 |
---|---|
구구단 출력 예제 for Visual Basic (0) | 2009.02.14 |
현재 시각 알아내기 for Visual Basic (0) | 2009.02.14 |
(최대공약수 구하기) while... 반복문 예제 for Visual Basic (0) | 2009.02.14 |
80컬럼 컨솔에 19단표 출력하기 예제 for Visual Basic (0) | 2009.02.13 |