Material to Understand

Exercises

  1. Write a function that receives a 1-D integer array of size 5 and returns the value of the smallest integer contained in the array.
  2. Declare a 3 by 5 matrix named numbers that initially contains all 7s.
  3. Write a function called print-matrix that prints out the contents of the matrix that is passed in. The function should use the format statement and should determine the bounds of the matrix using the built-in function, array-dimension .
  4. Write a function called fill-matrix-randomly that gives each slot within the passed in matrix a random value between 0 and 10 inclusive.
  5. Type (dribble "output") to send a copy of everything you do in the interpreter to a file called output. Type (dribble) when you want to stop recording. Try this out! It can be very handy when you want to capture the output that your running program produces.