Using visual basic microsoft visual studio Sorted names Design a program that al
ID: 3806020 • Letter: U
Question
Using visual basic microsoft visual studioSorted names Design a program that allows the user to enter 20 names into a string array. Sort the array in ascending (alphabetical) order and display its contents. **i asked this question before but the answer was unclear many errors when i copy and paste into VB. Please make jt so i can just copy paste and understand it Using visual basic microsoft visual studio
Sorted names Design a program that allows the user to enter 20 names into a string array. Sort the array in ascending (alphabetical) order and display its contents. **i asked this question before but the answer was unclear many errors when i copy and paste into VB. Please make jt so i can just copy paste and understand it
Sorted names Design a program that allows the user to enter 20 names into a string array. Sort the array in ascending (alphabetical) order and display its contents. **i asked this question before but the answer was unclear many errors when i copy and paste into VB. Please make jt so i can just copy paste and understand it
Explanation / Answer
Module Sort
Sub Main()
Dim strData(19) As String ' an array of 20 strings
‘prompt the user to enter values
Console.WriteLine("Please enter 20 strings")
For i As Integer = 0 To 19 Step 1
strData[i]= Console.ReadLine()
Next i
Array.Sort(strData)'sort array
Dim arrayItem As String
'displaying the values
For Each arrayItem In strData
Console.WriteLine(arrayItem)
Next
Console.ReadLine()
End Sub
End Module
Thhis is to be on VB Console Application.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.