In the C ++ programming language, some judgment statements exist, such as the if and C ++ switch-case statements. In this article, we will introduce the basic usage of the C ++ switch-case statement in detail, hoping to help you.
Detailed
Switch-case retrun break, switch-caseretrun
{
If statements process two branches, the if-else-if structure must be used when processing multiple branches. However, if there are many branches, the more nested if statement layers, the program is not
Loop controlThere may be a situation when we need to execute a block of code several times, often referred to as a loop.Java has a very flexible three-loop mechanism. You can use one of the following three loops:
While loop
Do...while
1. IF statements are an important feature of most languages. they execute program segments based on conditions. Php's IF statement is similar to C: if (exPR) statement. as discussed in the expression, expr is calculated as its true value. If expr is
"Java from small white to Daniel" paper version has been shelves!!!There are three kinds of control statements in program design, namely, order, branch and Loop statement. The Java program manages the flow of the program through control statements
Statement blockBlock: A compound statement that refers to multiple Java statements enclosed by a pair of curly braces.A statement block can contain another block of statements.The statement block determines the scope of the variable.A variable
Application of PHP control statements
1. IF statement
IF statements are an important feature of most languages. They execute program segments based on conditions. PHP's IF statement is similar to C:
If (expr)
Statement
As discussed in the expression,
1. If statement
If statements are an important feature of most languages. They are executed based on conditions.Program. PHP's If statement is similar to C:
If (expr)
Statement
As discussed in the expression, expr is calculated as its true
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.