Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I would appreciate it if some could help me please. I amwriting this program in

ID: 3609124 • Letter: I

Question

I would appreciate it if some could help me please. I amwriting this program in C# and the problem says: Write a programthat reads in 5 numbers and displays the largest and smallest ofthe five numbers. i gotten the program to read in the 5 numbers. myproblem is gettin it to display the largest and the smallest. itsdue by 1 pm today soorry for the late notice....thanks I would appreciate it if some could help me please. I amwriting this program in C# and the problem says: Write a programthat reads in 5 numbers and displays the largest and smallest ofthe five numbers. i gotten the program to read in the 5 numbers. myproblem is gettin it to display the largest and the smallest. itsdue by 1 pm today soorry for the late notice....thanks

Explanation / Answer

    SubMain()

      Dim n1 As Integer
      Dim n2 As Integer
      Dim n3 As Integer
      Dim n4 As Integer
      Dim n5 As Integer
      Dim high As Integer
      Dim low As Integer

  
      Console.Write("Enter the firstNumber :")
       n1 =Console.ReadLine()

      Console.Write("Enter the secondNumber : ")
      n2 = Console.ReadLine()

      Console.Write("Enter the thirdNumber : ")
      n3 = Console.ReadLine()

      Console.Write("Enter the fourthNumber:")
      n4 = Console.ReadLine()

    Console.Write("Enter the fifth Number : ")
      n5 = Console.ReadLine()

      high = n1
      low = n1

      If n3 > high Then
      high = n3
      ElseIf n3 < low Then
      low = n3
      End If

      If n4 > high Then
      high = n4
    ElseIf n4 < low Then
      low = n4
      End If

      If n5 > high Then
      high = n5
      ElseIf n5 < low Then
      low = n5
      End If

      Console.WriteLine("The Hightestnumber is " & high & ". The Lowest number is " &low)

   EndSub