Hello.. I'm working on a reversing program in vb.net
The first thing that we have to do is to reverse the input without using the reverse method and this is how i did it.
Dim input As String = txtInput.Text
Dim output As String = ""
Dim CharStr As New Char
For Each CharStr In input
output = CharStr & output
Next
txtOutput.Text = output
now i need to make the reversed input in alternate casing.
ex: the input is computer and the output will be ReTuPmOc
i can only make the proper case, pls help :(
Module Module1
Sub Main()
Dim input As String = "Retupmoc"
Dim output As String = ""
Dim txtOutput As String = ""
For i As Integer = input.Length - 1 To 0 Step -1
output += input(i)
Next
For i As Integer = 0 To input.Length - 1
If (i Mod 2 = 1) Then
txtOutput += input(i).ToString().ToLower()
Else
txtOutput += input(i).ToString().ToUpper()
End If
Next
Console.WriteLine(output)
Console.WriteLine(txtOutput)
Console.ReadLine()
End Sub
End Module
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!