User Input
Conditionals
if-statement
Nested if-statements
switch-case statements
Loops
while loop
do-while loop
for loop
Indexed sequence of values of the same type
Example:
52 playing cards in a deck
1 million characters in a book
130 students in this course sorted by their ID
Goal: 10 variables of type int
Goal: 10 variables of type int
Declares, creates, and initializes values
To make an array, declare, create and initialize it.
To access element 'i' of an array named ‘a’, use a[i].
Array indices start at 0.
Declare, create, and initialize in one statement.
Default initialization: all numbers automatically set to 0.
Dot product of two vectors