关于到达楼梯得分问题

Console.Write("请输入到达了第几节楼梯");
int a = Convert.ToInt32(Console.ReadLine());
int end = 0;
if (a >= 0 && a <= 49)
{
for (int b = 0; b <= a; b++)
{
end = end + b;

}
}
else if (a >= 50 && a <= 100)
{
for (int c = 1; c <= (a-49); c++)
{
end = 1225 + 10 * c;
}
}
else
{
Console.WriteLine("输入错误");
}

Console.WriteLine(end);

原文地址:https://www.cnblogs.com/zzc134680/p/5398515.html