05_选择.pptVIP

  • 1
  • 0
  • 约 43页
  • 2017-06-12 发布于浙江
  • 举报
05_选择

第五章 主要内容 5.1 关系运算符和关系表达式 5.2 逻辑运算符和逻辑表达式 5.3 if语句 5.4 switch语句 5.5 程序举例 §5.1 关系运算符和关系表达式 §5.1 关系运算符和关系表达式(续) §5.2 逻辑运算符和逻辑表达式 §5.2 逻辑运算符和逻辑表达式(续) §5.2 逻辑运算符和逻辑表达式(续) §5.2 逻辑运算符和逻辑表达式(续) §5.2 逻辑运算符和逻辑表达式(续) §5.3 if语句 §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.3 if语句(续) §5.4 switch语句 §5.4 switch语句(续) §5.4 switch语句(续) §5.4 switch语句(续) 上机安排 时 间:第11周(本周)至14周的 星期五 16:00~18:00 地 点:第二实验楼的A208 上机内容:第6章 6.3、6.8题 (P129) 提 示:16:10~16:20点名签到 §5.5 程序举例 §5.5 程序举例(续) §5.5 程序举例(续) §5.5 程序举例(续) §5.5 程序举例(续) §5.5 程序举例(续) §5.5 程序举例(续) §5.5 程序举例(续) #include stdio.h void main() { char grade; scanf(%c,grade); switch(grade) { case A: printf(85~100\n); case B: printf (70~84\n); case C: printf (60~69\n); case D: printf (60\n); default: printf (error\n); } } Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. #include stdio.h void main() { char grade; scanf(%c,grade); switch(grade) { default: printf (error\n); case A: printf(85~100\n); case B: printf (70~84\n); case C: printf (60~69\n); case D: printf (60\n); } } Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. #include stdio.h void main() { char grade; scanf(%c,grade); switch(grade) { case A: printf(85~100\n);break; case B: printf (70~84\n); break; case C: printf (60~69\n); break; case D: printf (60\n); break; default: printf (error\n); } } Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 例5.5 编写程序,判断某一年是否闰年。 用下图来表示判断闰年的算法。 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client

文档评论(0)

1亿VIP精品文档

相关文档