vbcode

Module Module1

 

Sub Main()

Dim name As String, roll, phy, che, comp, maths, english As Integer

Console.WriteLine(“Enter your name “)

name = Console.ReadLine()

Console.WriteLine(“Enter your roll no “)

roll = Console.ReadLine()

Console.WriteLine(“Enter your marks in Physics”)

phy = Console.ReadLine()

Console.WriteLine(“Enter your marks in Chemistry”)

che = Console.ReadLine()

Console.WriteLine(“Enter your marks in Computer/Bio”)

comp = Console.ReadLine()

Console.WriteLine(“Enter your marks in Maths”)

maths = Console.ReadLine()

Console.WriteLine(“Enter your marks in English”)

english = Console.ReadLine()

Console.WriteLine()

Console.WriteLine()

Console.WriteLine()

Console.WriteLine(“Name : ” & name)

Console.WriteLine(“Roll.No : ” & roll)

Console.WriteLine(“****************************************************************”)

Console.WriteLine(“Subject                                     Grade”)

If phy >= 80 Then

Console.WriteLine(“Physics                                        A”)

ElseIf phy >= 60 Then

Console.WriteLine(“Physics                                        B”)

ElseIf phy >= 40 Then

Console.WriteLine(“Physics                                        C”)

Else

Console.WriteLine(“Physics                                        D”)

 

End If

If che >= 80 Then

Console.WriteLine(“Chemistry                                      A”)

ElseIf che >= 60 Then

Console.WriteLine(“Chemistry                                      B”)

ElseIf che >= 40 Then

Console.WriteLine(“Chemistry                                      C”)

Else

Console.WriteLine(“Chemistry                                      D”)

 

End If

If comp >= 80 Then

Console.WriteLine(“Computer/Bio                                   A”)

ElseIf comp >= 60 Then

Console.WriteLine(“Computer/Bio                                   B”)

ElseIf comp >= 40 Then

Console.WriteLine(“Computer/Bio                                   C”)

Else

Console.WriteLine(“Computer/Bio                                   D”)

End If

If maths >= 80 Then

Console.WriteLine(“Maths                                          A”)

ElseIf maths >= 60 Then

Console.WriteLine(“Maths                                          B”)

ElseIf maths >= 40 Then

Console.WriteLine(“Maths                                          C”)

Else

Console.WriteLine(“Maths                                          D”)

End If

If english >= 80 Then

Console.WriteLine(“English                                        A”)

ElseIf english >= 60 Then

Console.WriteLine(“English                                        B”)

ElseIf english >= 40 Then

Console.WriteLine(“English                                        C”)

Else

Console.WriteLine(“English                                        D”)

End If

Console.ReadKey()

End Sub

 

End Module

 

Hits: 5