desgn a for to accept the name of the student and marks in 5 subjects. calculate the average marks obtained . grade the student as follow
marks<=40 D grade
marks>=40 And =<60 C grade
marks>=60 And=<75 B grade
marks>=75 A grade
i want coding for this
1
Expert's answer
2012-10-23T09:32:30-0400
Module Module1
Sub Main()
Dim Sum As Double
Dim Average As Double
Dim LetterGrade As String
Sum = 0
For index As Integer = 1 To 5
Console.WriteLine("Please enter a grade")
Sum = Sum + Convert.ToDouble(Console.ReadLine())
Next
Average = Sum / 5
Console.WriteLine("The average grade: {0}", Average.ToString())
Comments
Leave a comment