Write an application that allows the user to enter three Double values, then determines and displays the smallest and largest values. Provide methods Minimum and Maximum that each receive three Double values and return a Double result.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Private Sub compareButton_Click(sender As Object, e As EventArgs) Handles compareButton.Click

       Dim sales1 As Double ' sales1 enter by user
       Dim sales2 As Double ' sales2 enter by user
       Dim sales3 As Double ' sales3 enter by user
       Dim small As Double ' smallest sales
       Dim large As Double ' largest sales

       sales1 = Double.Parse(sales1TextBox.Text) ' get first sales amount entered by user
       sales2 = Double.Parse(sales2TextBox.Text) ' get second sales amount entered by use
       sales3 = Double.Parse(sales3TextBox.Text) ' get third sales amount entered by user

       large = sales1 ' assigns sales1 as the default largest number
       small = sales1 ' assigns sales1 as the default smallest number

       If sales2 > large Then ' number sales2 is greater than large
            large = sales2
       End If

       If sales3 > large Then ' number sales3 is greater than large
            large = sales3
       End If...
$15.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Visual Basic Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats