. CSE 109 HW 4 9 PM Tuesday 25 March 2008 This homework is an exercise in writing simple Simpletron programs and is meant to have you become familiar with the Simpletron language. Write two Simpletron programs. The first should read in a list of non- zero integers, the list being of any length, write out each number, and write out the cube of the sum of the positive numbers and the square of the sum of the negative numbers. The second should read in 5 pairs of positive ints and for each pair write 1 if the square of the first number in the pair is greater than the second number in the pair and writes out a 0 otherwise. A 0 should serve as a sentinel for the first list. Use sml (stored in /proj/csc109/bin/sml) to make sure your program works properly. Note, with sml you can use the -v option to get more verbose output. The first sml program should use the following data: 18 4 -4 6 12 5 -3 7 6 -4 0. The second sml program shoud use the following data: 3 4 8 3 12 12 17 33 288 12. Of course your programs should work for other sets of data. To submit your homework, create a subdirectory of cse109.081 called hw4 (that is, from your root directory /cse109.081/hw4). In hw4 store two files, the first called hw4.prog1 and containing your first Simpletron program and the second called hw4.prog2 and containing your second Simpletron program. The subdirectory hw4 should contain no other files. NOTE: This homework (and all homeworks) will only be collected once (unlike programming assignments, for which there will be multiple opportunities to submit your solution).