Enter you name here: * Enter your student number here: * ================================================================================ Answer all 3 questions. All questions carry equal marks. Remember to save all files as you go along. ================================================================================ Question 1 ========== Write a program called normalise.cc that: 1. Reads in from the user a sequence of 5 floats and puts them in an array 2. Computes and displays the maximum number in the sequence 3. Divides each element of the array by the maximum number in the sequence 4. Displays the new array For example: Enter the 5 numbers separated by spaces: 2 5 8 20 15 The maximum value is 20 The normalised array is: 0.1 0.25 0.4 1 0.75 Question 2 ========== Write a program called average2d.cc that: 1. Reads in a 4 x 4 matrix of integers from the user 2. Computes the average of each column in the matrix 3. Displays the average of each column in the matrix For example: Enter row 0 1 2 3 4 Enter row 1 5 6 7 8 Enter row 2 9 8 7 6 Enter row 3 5 4 3 2 Averages: 5 5 5 5 Question 3 ========== Write a program called points.cc that: 1. Repeatedly reads in from the user the coordinates of two points: (x1, y1) and (x2, y2) 2. Calls a function that calculates and returns the distance between the two points 3. Prints out the distance calculated 4. Exits when the points entered are (0, 0) and (0, 0) Note: The distance between two points (x1, y1) and (x2, y2) can be calculated by taking the square root of [ (x2 - x1)^2 + (y2 - y1)^2 ] where ^ means "to the power of" For example: Enter x1 and y1: 0 0 Enter x2 and y2: 1 1 The distance between the two points is 1.41421 Enter x1 and y1: 0 0 Enter x2 and y2: 3 4 The distance between the two points is 5 Enter x1 and y1: 0 0 Enter x2 and y2: 0 0