Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Module Module1
- Private States(49) As String
- Private Capitals(49) As String
- Sub Main()
- End Sub
- Public Sub ParseFile(ByVal Path As String)
- Using sr As New StreamReader(Path)
- For i = 0 To 49
- States(i) = sr.ReadLine()
- Capitals(i) = sr.ReadLine
- Next
- End Using
- End Sub
- Public Function GetCaptial(ByVal State As String) As String
- For i = 0 To 49
- If State(i) = State Then Return Capitals(i)
- Next
- Return "There is no state of " & State
- End Function
- Public Function GetState(ByVal Capital As String) As String
- For i = 0 To 49
- If Capitals(i) = Capital Then Return States(i)
- Next
- Return "There is no capital of " & Capital
- End Function
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement