Here are some exercises that we may complete in class
Count the number of “3” in a string using substr
Modify this code to use array notation
Go over array notation from slides
Create code to read in a bunch of integers with a -1 to stop
Do the following examples on the board
Write a function to create the sum of all of the integers
Write a function to multiply each integer by 2
Write a function to print out the number of stars specified by the integer
Use the sound example to do the following
Introduce a 2 second echo
Notice that it has multiple echoes, copy the array
Speed it up to double speed
Slow it down to half speed
Reverse it using a temporary variable
Do the landscape example
Have one student write code to initialize a two dimensional array
show them how to write the code out to a file by inputting the file name
Bring it up in excel and graph it
Do vectors and show how the parking attendant moves the cars
Back to top