TAILIEUCHUNG - Lecture C++ for everyone (2nd edition): Chapter 3 - Cay S. Horstmann

Chapter 3 - Decisions. one of the essential features of computer programs is their ability to make decisions. like a train that changes tracks depending on how the switches are set, a program can take different actions, depending on inputs and other circumstances. In this chapter, you will learn how to program simple and complex decisions. You will apply what you learn to the task of checking user input. | C++ for Everyone by Cay Horstmann Copyright © 2012 by John Wiley & Sons. All rights reserved Chapter Three: Decisions Slides by Evan Gallagher Chapter Goals To be able to implement decisions using if statements To learn how to compare integers, floating-point numbers, and strings To understand the Boolean data type To develop strategies for validating user input C++ for Everyone by Cay Horstmann Copyright © 2012 by John Wiley & Sons. All rights reserved The if Statement Decision making (a necessary thing in non-trivial programs) C++ for Everyone by Cay Horstmann Copyright © 2012 by John Wiley & Sons. All rights reserved The if Statement We aren’t lost! We just haven’t decided which way to go yet. C++ for Everyone by Cay Horstmann Copyright © 2012 by John Wiley & Sons. All rights reserved The if Statement The if statement allows a program to carry out different actions depending on the nature of the data being processed C++ for Everyone by Cay Horstmann Copyright © 2012 by John .

TÀI LIỆU LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.