CS 497C - Programming Assignment 1 - Name:_____________________________ DUE: Wednesday, November 28 (in class) o Please show all work on a separate sheet attached to this sheet when you turn it in. o For each exercise, submit a listing of your source code along with scripted output showing that the code executes correctly. To generate scripted output on the UNIX system, use the "script" command: $ script ex.out (script started, everything on the terminal goes to the file "ex.out") $ ex1 27 80 45 27 45 80 $ ex2 (show the execution.) $ ex3 13 The sum is 49. $ exit Script finished, output sent to "ex.out". o Both the hard copy and the electronic copy should be submitted. o For each exercise, submit a runnable script. The names of the script should be ex1, ex2, and ex3 respectively. o Use the handin system to submit all code electronically. The submission ID is 1: ~cs497c/bin/handin 1 ex1 ex2 ex3 ex.out o Thanks! (60 points - 20 points for each problem) 1. Write a script to read in three numbers as arguments, compare them, and list them in an ascending order. (hint: Use the if statement.) $ ex1 30 10 45 10 30 45 2. Write a command menu as follows: $ ex2 Command Menu a. Current date and time b. Users currently logged in c. Name of the working directory d. Contents of the working directory Enter a, b, c, or d: The function for each selection is as indicated in the menu. (hint: Use the case statement.) 3. Write a script to read in an odd number n as an argument and calculate the arithmetic summation 1 + 3 + 5 + 7 + .... + n. (hint: Use the looping statement.) $ ex3 11 The sum is 36.