- 121
- 0
- 约1.63万字
- 约 45页
- 2017-05-06 发布于浙江
- 举报
[2017年整理]河南理工大学C语言第五章课后习题答案
第五章 循环结构程序设计 4.编程题 (1)求下列式子的值。 #include stdio.h void main() { float sum,n,t1,t2; sum=0;n=1; while(n=100) { t1=1/n; t2=-1/(n+1); sum=sum+t1+t2; n=n+2; } printf(%f\n,sum); } 一次求两项 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. 第五章 循环结构程序设计 4.编程题 (1)求下列式子的值。 void main( ) { float s, n, t1, t2; s=0; n=1; while(n100) { t1=1/n; t2=-1/(n+1); s=s+t1+t2; n=n+2; } printf(%f,s); } #include stdio.h void main( ) { float s, n, t1, t2; s=1; n=1; t1=1; while(n100) { n++; t1=-t1;
原创力文档

文档评论(0)