I am working on a program with the following requirements:
Write a program to calculate the average of all scores entered between 0 and 100. Use a sentinel-controlled loop variable to terminate the loop. After values are entered and the average calculated, test the average to determine whether an A, B, C, D, or F should be recorded. The scoring rubric is as follows:
A—90-100; B—80-89; C—70-79; D—60-69; F < 60
Here is what I have so far:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PRG205_FinalAssessment_Doyle
{
class Program
{
static void Main(string[] args)
{
int[] marks;
int minput = 1, counter = 0, total = 0;
float aveg = 0.0f;
String Gradeletter = "C";
marks = new int[100];
Console.WriteLine("Enter Student Grade");
while (minput > 0)
{
minput = Convert.ToInt32(Console.ReadLine());
if (minput >= 0)
{
marks[counter++] = minput;
total += minput;
Console.WriteLine("Enter student grade or any negative value to calculate average");