Question
Modify the C# code above to do the following: 1- Receive student grade 2- After printing the report, calculate the average of all scores. 3-
Modify the C# code above to do the following: 1- Receive student grade 2- After printing the report, calculate the average of all scores. 3- Display the highest grade. 4- Display the lowest grade.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UnsingArrays { class Program { static void Main(string[] args) { int[] grades; string[] names; string name; int elements = 0; Console.Write("Enter Count of Enrolled Students: "); elements = Convert.ToInt32(Console.ReadLine()); grades = new int[elements]; names = new string[elements]; if (elements > 0) { for (int i = 0; i < elements; i++) { Console.Write("Enter Student Name or X to exit: "); name = Console.ReadLine(); if(name.ToUpper() == "X") { i = elements; } else { names[i] = name; Console.Write("Enter " + name + "'s grade: "); //Enter code for grades } } for(int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started