Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
50% found this document useful (14 votes)
34K views

Write Program in Visual Basic To Display Mark List of A Student

The document declares variables to store integers for subjects, total marks, percentage, and grade. It contains code for a click event that iterates through subjects, calculates total and percentage, adds subjects and results to lists. It determines the grade based on percentage, adding student name, roll number, total, percentage and grade to a results list.

Uploaded by

9y9a
Copyright
© Attribution Non-Commercial (BY-NC)
50% found this document useful (14 votes)
34K views

Write Program in Visual Basic To Display Mark List of A Student

The document declares variables to store integers for subjects, total marks, percentage, and grade. It contains code for a click event that iterates through subjects, calculates total and percentage, adds subjects and results to lists. It determines the grade based on percentage, adding student name, roll number, total, percentage and grade to a results list.

Uploaded by

9y9a
Copyright
© Attribution Non-Commercial (BY-NC)
You are on page 1/ 2

Dim i As Integer Dim subject(5) As Integer Dim total As Integer Dim per As String Dim grade As String

Private Sub Command1_Click() Static pass As Integer If i <= 4 Then If subject(i) > 45 Then pass = pass + 1 End If subject(i) = Text3.Text total = total + subject(i) per = (total / 500 * 100) List1.AddItem "Paper" & i + 1 & " = " & subject(i) Text3.Text = "" Text3.SetFocus i =i + 1

Else If per >= 60 Then List2.AddItem "Name:" & Text1.Text List2.AddItem "Roll No:" & Text2.Text List2.AddItem "Total:" & total List2.AddItem "Percentage:" & per List2.AddItem "Grade:" & "1"

Else If per >= 50 And per < 60 Then List2.AddItem "Name:" & Text1.Text List2.AddItem "Roll No:" & Text2.Text List2.AddItem "Total:" & total List2.AddItem "Percentage:" & per List2.AddItem "Grade:" & II Else List2.AddItem "Name:" & Text1.Text List2.AddItem "Roll No:" & Text2.Text List2.AddItem "Total:" & total List2.AddItem "Percentage:" & per List2.AddItem "Grade:Fail" End If End If End If End Sub

You might also like