Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'VisualBasic solution to codeabbey challenge 72
- Imports System
- Module compiler
- Sub Main()
- Dim inp1() As Integer = {22, 1838911}
- Dim inp2() As Integer = {3, 5, 5, 4, 6, 8, 8, 5, 3, 5, 4, 7, 6, 4, 3, 5, 5, 7, 7, 5, 8, 6}
- Dim con() As String = {"b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w", "x", "z"}
- Dim vow() As String = {"a", "e", "i", "o", "u"}
- Dim a, i, aa, cc, mm, xn, li As Integer
- aa = 445
- cc = 700001
- mm = 2097152
- xn = inp1(1)
- li = 0
- Dim rsp(inp1(0)-1) As String
- For a = 0 To inp2.Length-1
- Dim wl As Integer = inp2(a)
- Dim word As String = ""
- For i = 1 To wl
- xn = (aa*xn + cc) MOD mm
- If (i MOD 2 = 0) Then
- li = xn MOD 5
- word = word + vow(li)
- Else
- li = xn MOD 19
- word = word + con(li)
- End If
- Next
- rsp(a) = word
- Next
- Console.WriteLine (String.Join(" ", rsp))
- End Sub
- end Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement