class Program
{
static void Main(string[] args)
{
Student[] students = new Student[10];
int sum = 0;//成绩只能是整数,且没小数点
for (int i = 0; i < 10; i++)
{
//各种条件判断就不写了
string grade = Console.ReadLine();
students[i] = new Student();
students[i].Grade = int.Parse(grade);
sum += students[i].Grade;
}
Console.WriteLine("总成绩为{0}", sum);
Console.Read();
}
}
class Student
{
private int grade;
public int Grade
{
get { return grade; }
set { grade = value; }
}
}