using System;
class Student
{
public string Surname, Name, Patronymic, Gender, Nationality;
public int Height, Weight, Year, Month, Day;
public string Phone, Index, Country, Region, District;
public string City, Street, House, Apartment;
public string School;
public int ClassNumber;
public Student(string surname, string name, string patronymic,
string gender, string nationality, int height, int weight,
int year, int month, int day, string phone,
string index, string country, string region, string district,
string city, string street, string house, string apartment,
string school, int classNumber)
{
Surname = surname;
Name = name;
Patronymic = patronymic;
Gender = gender;
Nationality = nationality;
Height = height;
Weight = weight;
Year = year;
Month = month;
Day = day;
Phone = phone;
Index = index;
Country = country;
Region = region;
District = district;
City = city;
Street = street;
House = house;
Apartment = apartment;
School = school;
ClassNumber = classNumber;
}
public void Information()
{
Console.WriteLine($"ФИО: {Surname} {Name} {Patronymic}");
Console.WriteLine($"Пол: {Gender}, национальность: {Nationality}");
Console.WriteLine($"Рост: {Height}, вес: {Weight}");
Console.WriteLine($"Дата рождения: {Day}.{Month}.{Year}");
Console.WriteLine($"Телефон: {Phone}");
Console.WriteLine($"Адрес: {Index}, {Country}, {Region}, {District}, {City}, ул. {Street}, дом {House}, кв. {Apartment}");
Console.WriteLine($"Школа: {School}, класс: {ClassNumber}");
Console.WriteLine();
}
}
class Program
{
static void Main()
{
Student[] students =
{
new Student("Иванов", "Иван", "Иванович",
"Мужской", "Русский", 150, 45, 2015, 3, 12,
"123456", "12345", "Россия", "Московская",
"Центральный", "Москва", "Ленина", "10", "5",
"Школа №1", 5),
new Student("Петрова", "Анна", "Сергеевна",
"Женский", "Русская", 148, 42, 2015, 6, 20,
"654321", "54321", "Россия", "Московская",
"Центральный", "Москва", "Мира", "15", "8",
"Школа №2", 6)
};
foreach (Student student in students)
{
if (student.ClassNumber == 5)
student.Information();
}
}
}