public double gBel, gForeighn, gMath, gPhys, gChem, gBio;
public void calcAverage ()
this.average=(this.gBel + this.gBio + this.gChem + this.gMath + this.gPhys + this.gForeighn) / 6;
Console.WriteLine("---------------");
Console.WriteLine("С П Р А В К А");
Console.WriteLine("за успеха на {0}, ученик от", this.name);
Console.WriteLine("{0} клас, №{1}", this.clas, this.id);
Console.WriteLine("---------------");
Console.WriteLine("БЕЛ - {0,4:0.00}", this.gBel);
Console.WriteLine("Чужд език - {0,4:0.00}", this.gForeighn);
Console.WriteLine("Математика - {0,4:0.00}", this.gMath);
Console.WriteLine("Физика - {0,4:0.00}", this.gPhys);
Console.WriteLine("Химия - {0,4:0.00}", this.gChem);
Console.WriteLine("Биология - {0,4:0.00}", this.gBio);
Console.WriteLine("---------------");
Console.WriteLine("Среден успех - {0,4:0.00}", this.average);
public static void Main()
Student std = new Student();
Console.Write("Въведете име: ");
std.name = Console.ReadLine();
Console.Write("Въведете клас: ");
std.clas = Console.ReadLine();
Console.Write("Въведете номер: ");
std.id = Console.ReadLine();
Console.WriteLine("---------------");
Console.Write("Оценка БЕЛ: ");
std.gBel = double.Parse(Console.ReadLine());
Console.Write("Оценка Чужд език: ");
std.gForeighn = double.Parse(Console.ReadLine());
Console.Write("Оценка Математика: ");
std.gMath = double.Parse(Console.ReadLine());
Console.Write("Оценка Физика: ");
std.gPhys = double.Parse(Console.ReadLine());
Console.Write("Оценка Биология: ");
std.gBio = double.Parse(Console.ReadLine());
Console.Write("Оценка Химия: ");
std.gChem = double.Parse(Console.ReadLine());