I am a novice programmer though, I am trying to code a vb 6.0 system that calculates total marks from the exams done and return the output. I only know the simplest way of addition, but I want the way to compute total by taking only the exams taken by a student, say the system has provided 12 options for the entry while the student took only 7 exams, and so the everage will be x/7. what of the student who takes 10 exams and using the same system to compute?
my simplest code is here:
Dim total, gpa As Integer total = Int(Text19.Text) + Int(Text20.Text) + Int(Text21.Text) + Int(Text22.Text) + Int(Text23.Text) + Int(Text24.Text) + Int(Text25.Text) Label24.Caption = total gpa = total / 7 Label25.Caption = gpa