Results 1 to 2 of 2

Thread: Checking for the Biggest Number

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2009
    Posts
    32

    Checking for the Biggest Number

    Suppose I have 5 Integers(A, B, C, D, and E) and 5 Textboxes.

    When the program run, the user is going to input 5 numbers to those 5 textboxes. When a button is pressed, a label will show up and write the textbox number with the biggest number.

    Thanks!

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Checking for the Biggest Number

    Code:
    Dim Arr() As Integer = { _
        CInt(TextBox1.Text), _
        CInt(TextBox2.Text), _
        CInt(TextBox3.Text), _
        CInt(TextBox4.Text), _
        CInt(TextBox5.Text) _
    }
    
    Label1.Text = Arr.Max.ToString()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width