第3章分支结构重点.pptVIP

  • 42
  • 0
  • 约2.13万字
  • 约 84页
  • 2017-05-09 发布于湖北
  • 举报
第3章分支结构重点

# include stdio.h int main() { char op; double x, y; scanf(%lf %c %lf, x, op, y); if(op == +) printf(=%.2f\n, x + y); else if(op == -) printf(=%.2f\n, x - y); else if(op == *) printf(=%.2f\n, x * y); else if(op == /) printf(=%.2f\n, x / y); else printf(“Wrong input\n); } //分析以下程序段有何问题 if(op == +) printf(=%.2f\n, x + y); if(op == -) printf(=%.2f\n, x - y); if(op == *) printf(=%.2f\n, x * y); if(op == /) printf(=%.2f\n, x / y); else printf(“Wrong i

文档评论(0)

1亿VIP精品文档

相关文档