摘要: int c = 0; Console.WriteLine("请输入一个数"); int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { c = c + i; } Console.WriteLine(c); Console.ReadLine(); 阅读全文
posted @ 2009-11-17 15:29 kin2321 阅读(391) 评论(1) 推荐(0) 编辑
摘要: int c = 0; Console.WriteLine("请输入一个数"); int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { c = c + i; } Console.WriteLine(c); Console.ReadLine(); 阅读全文
posted @ 2009-11-17 15:23 kin2321 阅读(251) 评论(0) 推荐(0) 编辑