C语言练习题25947.docVIP

  • 3
  • 0
  • 约1.02千字
  • 约 10页
  • 2016-10-09 发布于江苏
  • 举报
习题三(第三章) { int a=1,b=2,c=3; 习题四(第4章) 习题三 参考答案 一.单选题 2.C 3.D 4.B 5.A 6.B 7.C 8.A 9.C 10.B 二.写出程序运行结果 1. 6 6 6.00 6.00 2. x=127,x= 127,x=177,x=7f Y=123.4567, y= 123.46 , y=123.45670 3. 2,1 4. 1234 5. 4,2 6. -6,-6 三.程序设计题 1. #include stdio.h #include math.h main() { float a,b,c,d,x1,x2; a=2;b=-3;c=-5; d=b*b-4*a*c; x1=(-b+sqrt(d))/(2*a); x2=(-b-sqrt(d))/(2*a); printf(x1=%.2f,x2=%.2f\n,x1,x2); } 2. #include stdio.h main() { float a,v,s; scanf(%f,a); v=a*a*a;s=6*a*a; printf(v=%.2f,s=%.2f\n,v,s); } 3. #include stdio.h main() { int a,b,c,t; s

文档评论(0)

1亿VIP精品文档

相关文档