Answer to Question #312189 in Visual Basic for Lance

Question #312189

students in the BIT level 300 class obtained various grades in a mid semester exam. a computer program is needed to find the highest and lowest class score

Create an algorithm for the computer program needed to solve the above program


1
Expert's answer
2022-03-15T16:46:09-0400


Imports System.IO


Module Module1
   
    Sub Main()
        Console.Write("Enter the number of students: ")
        Dim numberStudents As Integer = Integer.Parse(Console.ReadLine())
        Dim highest As Integer = Integer.MinValue
        Dim lowest As Integer = Integer.MaxValue
        For i As Integer = 0 To numberStudents - 1
            Console.Write("Enter grade a Mid sem exam: ")
            Dim grade As Integer = Integer.Parse(Console.ReadLine())
            If (grade > highest) Then
                highest = grade
            End If


            If (grade < lowest) Then
                lowest = grade
            End If
        Next
        Console.WriteLine("The highes class score: " + highest.ToString())
        Console.WriteLine("The lowest class score: " + lowest.ToString())


        Console.ReadLine()
    End Sub
End Module

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS