第3章媛-2 数据的输入输出.pptxVIP

  • 4
  • 0
  • 约1.54千字
  • 约 32页
  • 2018-12-31 发布于福建
  • 举报
第3章媛-2 数据的输入输出

3.4 数据的输入输出;3.4.1 输入输出举例; #include stdio.h #include math.h int main ( ) { double a,b,c,disc,x1,x2,p,q; scanf(%lf%lf%lf,a,b,c); disc=b*b-4*a*c; if (disc=0) { p=-b/(2.0*a); q=sqrt(disc)/(2.0*a); x1=p+q; x2=p-q; printf(x1=%7.2f\nx2=%7.2f\n,x1,x2); } return 0; }; #include stdio.h #include math.h int main ( ) { double a,b,c,disc,x1,x2,p,q; scanf(%lf%lf%lf,a,b,c); disc=b*b-4*a*c; if (disc=0) { p=-b/(2.0*a); q=sqrt(disc)/(2.0*a); x1=p+q; x2=p-q; printf(x1=%7.2f\nx2=%7.2f\n,x1,x2); } return 0; }; #include stdio.h #include math.h int main ( ) { do

文档评论(0)

1亿VIP精品文档

相关文档