Он говорит, что нет ошибок в файле, но он ничего не сделает, кроме как вернет хит, чтобы вернуться
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { } } // average class with automatic properties for the score1, score2 and score3. public class average { // auto-implemented property Score1 implicitly creates an // instance variable for the score1 public int Score1 { get; set; } // auto-implemented property Score2 implicitly creates an // instance variable for the score2 public int Score2 { get; set; } // auto-implemented property Score3 implicitly creates an // instance variable for the score3 public int Score3 { get; set; } //declare the remainder and avg variables int remainder; int avg; // constructor shell accepting three values, public average(int score1Value, int score2Value, int score3Value) { Score1 = score1Value; Score2 = score2Value; Score3 = score3Value; } // calculate the average of the three scores public void computeAverage() { avg=(Score1 + Score2 + Score3)/3; remainder=(Score1 + Score2 + Score3)%3; } // display the average, public void DisplayAverage() { Console.WriteLine($"The average of { Score1} , { Score2} , { Score3} is {ave} with a remainder of {remainder}");// output a new line } } public class averageTest { public static void Main(string[] args) { //instantiate a new average object here, passing the //the score1, score2 and score3 values respectively average myaverage = new average(23,30,40); //call myaverage.computeAverage myaverage.computeAverage(); //call myaverage.DisplayAverage() myaverage.DisplayAverage(); Console.WriteLine(); //output a new line } // end Main } } //end class average
Что я уже пробовал:
Я убедился, что все {} были правильными и избавился от любых ошибок.