Professional Documents
Culture Documents
A class of 15 students took a Test. The grades for this test are available to you.
Create a program that computes for the Class Average.
Sub main()
Total = 0
gradeCounter = 1
Console.write("Enter grade:")
grade = console.readline()
Total += grade
gradeCounter += 1
End while
average = total / 15
Console.writeline()
End Sub
Case 2
Main Sub()
Total = 0
scorecounter = 0
score = Console.ReadLine()
total += score
scoreCounter += 1
score = Console.ReadLine()
End While
End Sub
Case 3
A High School offers a review session that prepares students for the entrance
exam for College. Last year, 15 of the students who completed this review
session took the entrance examination. The High School wants to know how
well its students did on the exam. You have been asked to write a program to
summarize the results. You have been given a list of the 15 students. Next to
each name is written a “P” if the student passed the exam and an “F” if the
student failed the exam.
Sub Main()
result = Console.ReadLine()
passes += 1
Else
failures += 1
End If
student += 1
End While
Console.WriteLine("Passed: {0}{1}Failed: {2}", passes, _
vbCrLf, failures)
Console.WriteLine("Raise Tuition")
End If
End Sub
Case 4
Sub Main()
Sub Main()
side = Console.ReadLine()
column = 1
column += 1
End While
Console.WriteLine()
row += 1
End While
Else
Console.WriteLine
End If
End Sub