二级C语言上机题库及答案.docVIP

  • 20
  • 0
  • 约1.38万字
  • 约 19页
  • 2018-02-12 发布于河南
  • 举报
二级C语言上机题库及答案

第一套题 上机填空: #include stdio.h double fun(double e) { int i, k; double s, t, x; s=0; k=1; i=2; /**********found**********/ x=__1__/4; /**********found**********/ while(x __2__ e) { s=s+k*x; k=k* (-1); t=2*i; /**********found**********/ x=__3__/(t*t); i++; } return s; } main() { double e=1e-3; printf(\nThe result is: %f\n,fun(e)); 第一处答案: 3.0 第二处答案: 第三处答案:(2*i+1) 或者(t+1) 上机改错题: #include stdio.h /************found************/ void fun ( int n ) { int a, b, c, k; double s; s = 0.0; a = 2; b = 1; for ( k = 1; k = n; k++ ) { /**********

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档