Я пытаюсь придумать программу, которая вычисляет оценки, полученные из пользовательского ввода. Я также пытаюсь установить предел того, насколько высоким или низким может быть пользовательский ввод (т. Е. 0 <= или> = 100). Но когда я использую десятичное число, оно продолжает давать мне эту ошибку, «Оператор« <»не может быть применен к операндам типа« десятичный »и« двойной »»
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Grade_Program
{
class Program
{
static void Main(string[] args)
{
string First;
string Last;
First = "Cristiano";
Last = " Ronaldo";
Console.Write("Please enter student name <First Last>: ");
Console.WriteLine(First + Last );
Console.WriteLine(" ");
Console.WriteLine("*************NOTE**********************************************");
Console.WriteLine("*** Be sure to include decimal point for scores. ***");
Console.WriteLine("*** !!!All score should range from 0.00 to 100.00 !! ***");
Console.WriteLine("*** ***");
Console.WriteLine("*** For example : 80.50 ***");
Console.WriteLine("***************************************************************");
Console.WriteLine(" ");
decimal Exam_1;
decimal Exam_2;
decimal Exam_3;
decimal Assignment_1;
decimal Assignment_2;
Console.Write("Please enter score for Exam 1 <Example: 100.0>: ");
Exam_1 = Convert.ToDecimal(Console.ReadLine());
if (Exam_1 < 0.0 | Exam_1 > 100.0)
Console.Write("Exam score cannot be less than 0. or greater than 100.0. Please re-enter the score for Exam 1 <Example: 95.0>:");
Exam_1 = Convert.ToDecimal(Console.ReadLine());
Console.Write("Please enter score for Exam 2 <Example: 0.0>: ");
Exam_2 = Convert.ToDecimal(Console.ReadLine());