标签:
int sum = 0;
Console.Write("请输入数字:");
int shu = int.Parse(Console.ReadLine());
for (int i = 1; i <= shu; i++)
{
sum = sum + i;
}
Console.WriteLine("结果为:"+sum);
标签:
原文地址:http://www.cnblogs.com/lz123/p/4932145.html