C程序设计教程实验报告.docxVIP

  • 4
  • 0
  • 约6.15千字
  • 约 13页
  • 2019-06-11 发布于广东
  • 举报
实验报告 C#程序设计教程 2012至2013学年第一学期 编写一个控制台应用程序,输入正整数I),计算 s=l+(l+2)+(l+2+3)+?…+(1+2+3+ +n) Busingusing Busing using using using System? Collections. Generic; System. Linq; Syst em. Text; 6 - namespace第四章第六题 8日I 8日 I 9 10曰 111 12 13 14 15 16 17 18 19| 20 { static void Main (st ring [] args) { int rij ij j, s=0 ; Console. Write (输入整数n:): n二irrt. Parse (Console? ReadLine ()); for (i = 1; i = n; i++) for (j = 1; j = i: j卄) s += j ; Console? Writ eLine ( s= {0} s); Console?ReadKey(); 91 f ile:///F:/lianxi/第四章第六題/第四章第六S/bin/Debug/第四章第六题.EXE 输入整数n: 5 s=35 ■ 编写以控制台应用程序项目,利用已给出的公式计算兀的值 double pi = 0. 0; in

文档评论(0)

1亿VIP精品文档

相关文档