Dim score_obtained As Single 
Dim num As Integer 
Dim total_subjects As Single 
Dim counter As Integer 
Dim percentage As Single 
Dim total_score As Single 
total_subjects = InputBox(Enter the total number of subjects, _
Number of subjects) 
total_score = InputBox(Total Score, Enter the total score) 
num = (total_subjects) 
score_obtained = 0 
counter = 1 
Do Until counter > num 
total_subjects = InputBox(Enter the score of subjects  & _
counter.ToString, Score Obtained) 
score_obtained = score_obtained + (total_subjects) 
counter = counter + 1 
Loop 
percentage = score_obtained / total_score * 100 
lblPercentage.Text = percentage