大学计算机基础B_1.pptVIP

  • 20
  • 0
  • 约1.31万字
  • 约 77页
  • 2016-12-23 发布于江西
  • 举报
计算机文化基础B班上机 8,11-13 周 3E 3F 7,9-10,15-18 周 4D 4E * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #include iostream.h #include math.h void main() { double a,b,c,s,area; coutPlease input a,b,c=; cinabc; if (a+bca+cbb+ca) //判断是否构成三角形 { s=(a+b+c)/2; area=sqrt(s*(s-a)*(s-b)*(s-c)); //求面积 coutArea=areaendl;//输出计算结果 } else coutCant construct triangle\n; //不能构成三角形,输出说明 } 输入x的值 x0 真 假 0?y 输出y的值 x≤5 真 假 x?y x2?y 开 始 结 束 多分支问题1 y = x (0≤x≤5) 0

文档评论(0)

1亿VIP精品文档

相关文档