Beginner VB

Moderators: None (Apply to moderate this forum)
Number of threads: 1242
Number of posts: 2988

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Need help with loop program Posted by Failor on 20 Feb 2012 at 12:42 PM
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.
 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

Attachment: Chart.pdf (66649 Bytes | downloaded 60 times)
Report
Re: Need help with loop program Posted by Failor on 20 Feb 2012 at 12:51 PM
ohh wow I apologize for spam ...glitched I guess



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.