public string ClassNumber;
public double BulgarianLanguage;
public double ForeignLanguage;
public double Mathematics;
public double AverageGrade()
return (BulgarianLanguage + ForeignLanguage + Mathematics + Physics + Chemistry + Biology) / 6;
public void DisplayInfo()
Console.WriteLine("Име на ученика: {name}");
Console.WriteLine("Клас: {Class}");
Console.WriteLine("Номер в класа: {ClassNumber}");
Console.WriteLine("БЕЛ: {BulgarianLanguage}");
Console.WriteLine("Чужд език: {ForeignLanguage}");
Console.WriteLine("Математика: {Mathematics}");
Console.WriteLine("Физика: {Physics}");
Console.WriteLine("Химия: {Chemistry}");
Console.WriteLine("Биология: {Biology}");
Console.WriteLine("Среден успех: {AverageGrade():F2}");
public static void Main(string[] args)
Student student = new Student();
Console.Write("Въведете име на ученика: ");
student.Name = Console.ReadLine();
Console.Write("Въведете клас на ученика: ");
student.Class = Console.ReadLine();
Console.Write("Въведете номер на ученика в класа: ");
student.ClassNumber = Console.ReadLine();
Console.Write("Въведете оценка по БЕЛ: ");
student.BulgarianLanguage = double.Parse(Console.ReadLine());
Console.Write("Въведете оценка по Чужд език: ");
student.ForeignLanguage = double.Parse(Console.ReadLine());
Console.Write("Въведете оценка по Математика: ");
student.Mathematics = double.Parse(Console.ReadLine());
Console.Write("Въведете оценка по Физика: ");
student.Physics = double.Parse(Console.ReadLine());
Console.Write("Въведете оценка по Химия: ");
student.Chemistry = double.Parse(Console.ReadLine());
Console.Write("Въведете оценка по Биология: ");
student.Biology = double.Parse(Console.ReadLine());
Console.WriteLine("\n--- Информация за ученика ---");