using System;
using System.Collections.Generic;
using System.Linq;
class Student
{
public string Name { get; set; }
public int Age { get; set; }
public int Score { get; set; }
}
class Program
{
static void Main()
{
List<Student> students = new List<Student>()
{
new Student { Name = "Alice", Age = 20, Score = 85 },
new Student { Name = "Bob", Age = 17, Score = 78 },
new Student { Name = "Charlie", Age = 19, Score = 90 },
new Student { Name = "David", Age = 22, Score = 82 }
};
var result = from student in students
where student.Age > 18 && student.Score > 80
orderby student.Score descending
select student.Name;
foreach (var name in result)
{
Console.WriteLine(name);
}
}
}