by Nangyal Ghani Khan (4 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 31st October 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Find grade and percenage of the marks obtained
API Declarations
Event CLICK
'Name: - Percentage and grade of students
'Date: - 07/10/04
'day: - Thursday 5:52 PM
Private Sub Command1_Click()
Dim a, b As Integer
Dim c As Double
a = Val(Text1.Text)
b = Val(Text2.Text)
c = (a * 100) / b
If (c >= 80) Then
MsgBox "congratulations!you have obtained Grade A-1 and your marks are" & c & "%"
ElseIf (c >= 70) Then
MsgBox "congratulations!Yuo have obtained Grade A and your marks are" & c & "%"
ElseIf (c >= 60) Then
MsgBox "Your Grade is B and Your marks are" & c & "%"
ElseIf (c >= 50) Then
MsgBox "Your Grade is C and your marks are" & c & "%"
ElseIf (c >= 40) Then
MsgBox "Your Grade is D and your marks are" & c & "%"
ElseIf (c <= 40) Then
MsgBox "Your grade is E and your marks are" & c & "%"
End If
End Sub