Visual Basic (Visual Studio 2017): Convert Grade Write a visual basic program th
ID: 3889198 • Letter: V
Question
Visual Basic (Visual Studio 2017): Convert Grade
Write a visual basic program that reads set of grades from the user until it receives a negative input (-1, it should calculate all the input entered after receiving -1 input). The negative input should not be use in your calculations. Using A = 90 to 100, B= 80 to 89, C = 70 to 79, D=60 to 69, and F= 0 to 59 compute the followings:
--The total number of students in the class.
--The total numbers of student for each letter grade.
--The percentage of total number of student for each letter grade.
--The range of scores for each letter grade.
--The average score for each letter grade.
--The entire class average.
Input validation: The value must be an integer. The maximum possible score is 100.
Make sure to clearly display the Graphical user interface (display each letter grade) and shoud include input validation, standard naming conventions, and comments.
Explanation / Answer
Sub Main() Dim grade, sum, average As Double Dim numberofgrades As Integer = 2 Console.WriteLine("Please enter a grade") grade = Convert.ToDouble(Console.ReadLine()) sum += grade Console.WriteLine("Please enter a grade") grade = Convert.ToDouble(Console.ReadLine()) sum += grade average = sum / numberofgrades If average >= 90 Then Console.WriteLine("Grade is an A!") ElseIf average >= 80 AndRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.