Need help with loop program - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Need help with loop program

FailorFailor Posts: 4Member
Here is the program directions :Design a program that asks the user for series of names (in no particular order). After the final person's name has been entered, the program should display the name that is first alphabetically and the name that is last alphabetically. For example, if the user enters the names Kristin, Joel, Beth, Zeb, and Chris, the program would display Adam and Zeb. Also the chart that I am supposed to follow is attached.
And here is the code that I've been going at for past 13 hrs. Please help me to figure it out. [code] Module Module1
Const MAX_Names = 6
Sub Main()
Dim name As String
Dim count As Integer
Dim highName as String
Dim lowName as String
count = 0
Do Until count = MAX_Names
Console.WriteLine("Enter the name: ")
name = Console.ReadLine


>>>>need some kind of condition that will test the names<<

count = count + 1
Loop

Console.Write("Low name is:" + highName + vbCrLf)
Console.Write("High name is:" + lowName + vbCrLf)

End Sub
End Module[/code]

Comments

Sign In or Register to comment.