0% found this document useful (0 votes)
5 views2 pages

Student Marks Calculation Module

The document is a Visual Basic program that processes student marks for English, Urdu, and Math. It calculates the total and percentage of marks for each student, as well as the average marks in Math, the highest marks in English, and the lowest marks in Urdu. The results are displayed in a formatted table after each calculation step.

Uploaded by

zluffy392
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Student Marks Calculation Module

The document is a Visual Basic program that processes student marks for English, Urdu, and Math. It calculates the total and percentage of marks for each student, as well as the average marks in Math, the highest marks in English, and the lowest marks in Urdu. The results are displayed in a formatted table after each calculation step.

Uploaded by

zluffy392
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Module Module1

Sub Main()
Dim Result(4, 7) As String
Result(1, 1) = "1"
Result(1, 2) = "def"
Result(1, 3) = "60"
Result(1, 4) = "50"
Result(1, 5) = "40"
Result(2, 1) = "2"
Result(2, 2) = "abc"
Result(2, 3) = "70"
Result(2, 4) = "60"
Result(2, 5) = "80"
Result(3, 1) = "3"
Result(3, 2) = "xyz"
Result(3, 3) = "80"
Result(3, 4) = "70"
Result(3, 5) = "90"
Result(4, 1) = "4"
Result(4, 2) = "ijk"
Result(4, 3) = "40"
Result(4, 4) = "30"
Result(4, 5) = "50"
Console.WriteLine("ID Name ENG URDU MATH SUM PER")
For i = 1 To 4
Console.WriteLine(Result(i, 1) & " " & (Result(i, 2)) & " " &
Result(i, 3) & " " & Result(i, 4) & " " & Result(i, 5))
Next
For i = 1 To 4
Result(i, 6) = Int(Result(i, 3)) + Int(Result(i, 4)) + Int(Result(i,
5))
Next
Console.WriteLine(" After Sum Calculation ")
Console.WriteLine("ID Name ENG URDU MATH SUM PER")
For i = 1 To 4
Console.WriteLine(Result(i, 1) & " " & (Result(i, 2)) & " " &
Result(i, 3) & " " & Result(i, 4) & " " & Result(i, 5) & " " &
Result(i, 6))
Next
Console.WriteLine(" After Percentage Calculation ")
For i = 1 To 4
Result(i, 7) = Result(i, 6) / 300 * 100
Next
Console.WriteLine("ID Name ENG URDU MATH SUM PER")
For i = 1 To 4
Console.WriteLine(Result(i, 1) & " " & (Result(i, 2)) & " " &
Result(i, 3) & " " & Result(i, 4) & " " & Result(i, 5) & " " &
Result(i, 6) & " " & Result(i, 7))
Next
Dim Mathsavg, S As Integer
Console.WriteLine(" Average Marks of Maths")
S = 0
For i = 1 To 4
S = S + Int(Result(i, 5))
Next
Mathsavg = S / 4
Console.WriteLine(" " & Mathsavg & " ")
Dim H As Integer
Console.WriteLine(" Highest Marks in English ")
H = 0
For i = 1 To 4
If Int(Result(i, 3)) > H Then
H = Int(Result(i, 3))
End If
Next
Console.WriteLine(" " & H & " ")
Dim L As Integer
Console.WriteLine(" Lowest Marks In Urdu ")
L = 999
For i = 1 To 4
If Int(Result(i, 4)) < L Then
L = Int(Result(i, 4))
End If
Next
Console.WriteLine(" " & L & " ")
Console.ReadKey()
End Sub
End Module

You might also like