Как исправить приведенное ниже Сообщение об ошибке
static void Main(string[] args) { //Variable Declaration string studentName = ""; string studentGrade = ""; int studentScore = 0; double studentPercent = 0; //Output Greeting Console.WriteLine("Welcome to the Grade Calculator!: "); Console.WriteLine("___________________________________________________________"); Console.WriteLine("The purpose of the grade calculator is to help calculate your students grade for !"); Console.WriteLine("___________________________________________________________"); //Input inputs Console.WriteLine("Please enter in the students name: "); studentName = (Console.ReadLine()); Console.WriteLine("Please enter in the students score: "); studentScore = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("___________________________________________________________"); //Do Calculations if (studentScore < 0 || > 1000) - This line gives an error stating my > variable is not right. HOW DO I FIX THIS { Console.WriteLine("We apologize for the error. The value you entered in does not meet our criteria. Please enter in a number between 0 and 1000: "); } else { studentPercent = studentScore / 1000; studentPercent = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("You have entered in a good score: ");
Что я уже пробовал:
Я попытался использовать то, что предложила visual studio, но это дает мне больше ошибок. Я просто хочу, чтобы эта ошибка разрешилась. Как мне это сделать?