In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to use C language sentence and choice structure". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope this article "how to use C language sentences and choice structure" can help you solve the problem.
Knowledge point 1-statement 1.1 statement 1. Expression statement
An expression statement is made up of an expression plus a semicolon, and its general form is as follows:
Expression.
Q1: what is an expression?
A1: an expression is a formula made up of operators and data in C language; the result of an expression operation is called the value of an expression, and here are some common expressions.
/ / expression
one
-5
4: 20
X = qflux +% 3
A * (b + cplink d) / 20
Q > 3
Kiko: so the expression statement is done by adding a semicolon after the above expressions.
/ / expression statement
1
-5
4: 20
X = qflux +% 3
A * (b + cplink d) / 20
Q > 3
two。 Control statement
As can be seen by the name, control statements are used to control the execution of the program, which is defined by specific statements. I personally divide the control statements in C language into the following three categories:
Select statement: if-else statement, switch-case statement.
Loop statement: while statement, do-while statement, break statement.
Jump statement: break statement, goto statement, continue statement.
In this issue, we will talk about the first of the three types of sentences, that is, select sentences!
3. Empty sentence
An empty statement is a statement with only one semicolon that does nothing in the program and may just play a placeholder role.
; / / empty statement
For (int item0; I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.