Student Marksheet
Write a Console Application to create Student Marksheet.
Input:
Module MarksheetSub Main()
Dim m1, m2, m3, m4, m5, m6, t As Integer
Dim per As Double
Dim nm As String
Console.WriteLine("Welcome to Marksheet Console Application.")
Console.Write("Enter Student Name:")
nm = Console.ReadLine()
Console.Write("Enter Subject 1 Marks:")
m1 = Val(Console.ReadLine())
Console.Write("Enter Subject 2 Marks:")
m2 = Val(Console.ReadLine())
Console.Write("Enter Subject 3 Marks:")
m3 = Val(Console.ReadLine())
Console.Write("Enter Subject 4 Marks:")
m4 = Val(Console.ReadLine())
Console.Write("Enter Subject 5 Marks:")
m5 = Val(Console.ReadLine())
Console.Write("Enter Subject 6 Marks:")
m6 = Val(Console.ReadLine())
t = m1 + m2 + m3 + m4 + m5 + m6
per = t / 60
Console.WriteLine()
Console.WriteLine()
Console.WriteLine(" Student Marksheet")
Console.WriteLine("Name:" & nm)
Console.WriteLine("Total Obtained Marks:" & t)
Console.WriteLine("Percentages:" & per)
If per > 9.0 Then
Console.Write("Grade: O")
ElseIf per > 8.0 And per < 9.0 Then
Console.Write("Grade: A")
ElseIf per > 7.0 And per < 8.0 Then
Console.Write("Grade: B")
ElseIf per > 6.0 And per < 7.0 Then
Console.Write("Grade: C")
ElseIf per > 5.0 And per < 6.0 Then
Console.Write("Grade: D")
ElseIf per > 4.0 And per < 5.0 Then
Console.Write("Grade: E")
Else
Console.Write("Grade: F")
End If
Console.ReadKey()
End Sub
End Module
Comments
Post a Comment