CSE 305 Programming Languages Fall, 2003 Professor Shapiro Homework 9 Maximum Points: 12 Due 9:00 am, Tuesday, November 18, 2003 Copy this file to a text file named hw9.txt, edit into it your answers, and submit the file via the submit program by the deadline given above. 1. (6) In lecture, I said that changing the value of a variable that is used in any of the loop parameters within the body of the loop will not affect the number of times Fortran's DO loop is executed, but will change the number of times the for loop of any of the C-based languages is executed. Design a loop that will demonstrate this difference, and implement it, and run it in Fortran and in either Java, C, or C++. Paste your two programs and a copy of the output they produce into your hw9.txt file below this line. Be sure to try changing the terminal expression as well as the index variable. [note added 11/12/03] 2. (6) Using a case (switch) statement, write a function that implements the code of Chapter 8, Programming Exercise 3 of the text (page 350). Your function is to take one integer argument, as indicated by k in the text, and return the value indicated by j in the text. Write this function in both Common Lisp and in either Java, C, or C++. Paste your two functions into your hw9.txt file below this line.