VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Find grade and percenage of the marks obtained

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

Rate Find grade and percenage of the marks obtained



'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


Download this snippet    Add to My Saved Code

Find grade and percenage of the marks obtained Comments

No comments have been posted about Find grade and percenage of the marks obtained. Why not be the first to post a comment about Find grade and percenage of the marks obtained.

Post your comment

Subject:
Message:
0/1000 characters