private static void GradePercentages(int[] GradesEntered)
{
double GradeAPercentage = (GradesEntered[0] / TotalAmountofGrades) * 100;
Console.WriteLine("Grade A Percentage: {0}", GradeAPercentage);
}
private static void TotalAmountofGrades_Sum(int[] GradesEntered)//Total of Amount of Grades Sum Method
{
double TotalAmountofGrades = GradesEntered[0] + GradesEntered[1] + GradesEntered[2] + GradesEntered[3] + GradesEntered[4] + GradesEntered[5];
Console.WriteLine("Total Amount of Grades: {0}", TotalAmountofGrades);
}
I want to pass the value of the total amount of grades into the method to work out the percentage.Thanks


Sign In
Create Account


Back to top









