1. Exam Points
- identify if an integer is or is not evenly
divisibleby another integer- identify the
individual digitsin an integer- determine the
frequencywith which a specific criterion is met- determine a
minimum or maximumvalue- compute a
sum or averageNote:
Rangeof the loop control variable (1-19, 1-20, or (1,3,5,7,9))- How the
loop control variable changes. (++, --, +=2, +=3)Find a number that meets a criterion.
- (x % 3==1) x = 3n+1
- (x % 7==2) x = 7n+2
2. Knowledge Points
(1) Implementing Selection and Iteration Algorithms
Constructs/structures(构造)widely used in algorithms:Selection- if
- if-else
- if-else if
Iteration/Loop- while loops
- for loops
- There are
standard algorithmsto:-
- identify if an integer is or is not evenly
divisibleby another integer
- Ex. identify a multiple of 2 and 7
- identify if an integer is or is not evenly
-
identify the individual digitsin an integer
- Ex. print each digit in a number reversely
-
- determine the
frequencywith which a specific criterion is met
- Ex. count multiples of 6 between 1 to 30
- determine the
-
- determine a
minimum or maximumvalue
- Ex. find the minimum among 3 numbers
- determine a
-
- compute a
sum or average
- Ex. calculate the sum of numbers between 10 and 20
- compute a
-