using System.Collections.Generic;
using System.Threading.Tasks;
static void Main(string[] args)
using Microsoft.VisualBasic;
Console.WriteLine("Enter how many students (50 max)");
int hms = int.Parse(Console.ReadLine());
student = new string[hms];
for (int i = 1; i < hms; i++)
Console.WriteLine("Enter student name no." + i);
student[i] = Console.ReadLine();
Console.WriteLine("Enter exam no.1 score: ");
int exam1 = int.Parse(Console.ReadLine());
Console.WriteLine("Enter exam no.2 score: ");
int exam2 = int.Parse(Console.ReadLine());
Console.WriteLine("Enter exam no.3 score: ");
int exam3 = int.Parse(Console.ReadLine());
examA[i] = exam1 + exam2 + exam3;
Console.WriteLine("Lowest score: " + Math.Min(exam1, Math.Max(exam2, exam3)));
Console.WriteLine("Highest score: " + Math.Max(exam1, Math.Max(exam2, exam3)));
Console.WriteLine("Total score: " + examA[i]);
int highestScore = examA.Max();
int p = Array.IndexOf(examA, highestScore);
Console.WriteLine(student[p] + " got the highest score! " + highestScore + " points!");
int[] Math, Science, English;
Console.WriteLine( "Enter how many students (50 max)" ) ; hms = int .Parse(Console.ReadLine()); if
Console.WriteLine( "The maximum no. of students is 50" ) ; } else {
student = new string[hms + 1] ; English = new int[hms + 1] ; Math = new int[hms + 1] ; Science = new int[hms + 1] ; for (int i = 1 ; i <=hms ; i ++ ) {Console.WriteLine( "Enter student name no." +i ) ; student[i] = Console.ReadLine() ; Console.WriteLine( "Enter student name no." +i + " " +student[i] + " score" ) ; getMathScore();
Console.WriteLine(student[2] + " Math:" +Math[2] + " English: " +Science[2] + " English: " +English[2] ) ; } }
void getMathScore(int res = 41)
while (res < 0 || res > 40)
res = int.Parse(Console.ReadLine());
Console.WriteLine("The maximum score is 40");
void getScienceScore(int res = 41)
while (res < 0 || res > 40)
Console.Write("Science: ");
res = int.Parse(Console.ReadLine());
Console.WriteLine("The maximum score is 40");
void getEnglishScore(int res = 41)
while (res < 0 || res > 40)
Console.Write("English: ");
res = int.Parse(Console.ReadLine());
Console.WriteLine("The maximum score is 40");