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


Expert's answer



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!

LATEST TUTORIALS
APPROVED BY CLIENTS