Home > database >  notes
notes

Time:10-12

Algorithm a problem can have multiple
The representation method of algorithm
Order of the structure of the program: - select - cycle
Data type: 1, the symbolization of data - information 2. Data types (constants, variables, defined before use) the BGF floating-point type characters
Why do you want to define data types: one is build system according to the type distribution of the corresponding number of bytes in memory, 2 is type determines the data involved in the operation type of
% to sort out

Example:
Double a, b;
A % b

All of the floating-point type double default
Int - [signed] int




Operator - arithmetic (+ - */% + +, -)
Types of automatic shift

Example: 3.2 + 5/6-4.6 - type double - low level to high level of data

Types of casting high turn low
Grammar: (type) (expression)

Example: (int) + 5/6-4.6-3.2 to 3.2 int
(int) (3.2 + 4.6) 5/6 - will be the result of the expression to int

"+ +, -" : increase the value of the variable 1 or minus 1, case + + (a + b) error - variable is not the only
The prefix: first variable increase or decrease in the use of
The suffix: first increase or decrease after use