public const int AgeOfMajority = 18;
name = "Поспелов Павел Александрович";
public Person(string name, int age)
Console.WriteLine("{0}\n{1}", name, age);
public int GetYearsToAdulthood()
return AgeOfMajority > age ? 0 : AgeOfMajority - age;
age = value >= 0 && value <= 100 ? value : age;
name = value.Length > 5 ? value : name;
static void Main(string[] args)
DateTime dt = new DateTime(2020, 03, 25);
String st = new String(new char[] { 'П', 'К', 'С', '-', '8', '1' });
double perimetr = 2 * radius * Math.PI;
Console.WriteLine(perimetr);
Console.WriteLine(s.GetYearsToAdulthood());
Person text = new Person();
Person fam = new Person("Алексеев Пётр Сергеевич ", 48);
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("{0}\n{1}", text.OutAge, text.OutName);