What is the program flow structure of C++?
This article mainly introduces the relevant knowledge of what the program flow structure of C++ is, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this C++ program process structure. Let's take a look.
Preface
C _ + supports three basic program running structures: sequence structure, selection structure and loop structure.
The sequential structure is to write the code along the way, and I don't want to talk about it.
1 Select structure 1.1 if statement (no different from C)
Function: execute statements that meet the condition
There are three forms of if statements:
Single-line format if statement
Syntax:
If (condition) {statement that meets the condition} # includeusing namespace std;int main () {/ / user enters a score, if the score is greater than 600, it is deemed to be admitted to a university, and output / / 1 on the screen. User input score int score = 0; cout score; cout