Tải bản đầy đủ (.pdf) (35 trang)

Slide bài giảng C++ của FPT Software ngày 1, bài 2 (Decision Looping)

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (17.31 MB, 35 trang )


2


3


4


5


6


7


8


9


10


11



The nested if is an if statement, which is placed
within another if or else
In C, an else statement always refers to the
nearest if statement that is within the same
block as the else statement and is not already
associated with an if

12


13


The switch statement is a multi-way decision maker that tests the value of an
expression against a list of integers or character constants
When a match is found, the statements associated
with that constant are executed

14


15


16


17



18


19


20


21


22


23


24


25


×