Script started on Wed 18 Mar 2009 06:30:30 AM EDT [?1034h[06:30] m695340m@cslab100:~/Documents/cs130/calc_project/assign17 $ ./calc_v3 Enter Command: h 'e' to enter N1 and N2 'i' to enter a list of values (Q to stop) 'fi' File input: prompt for a filename and read values into list [] 'fo' File Output: prompt for a filename and write list values out. '+' Add (N1 + N2) '-' Subtract (N1 - N2) '*' Multiply (N1 * N2) '/' Divide (N1 / N2) '^' Raise any real N1 to the power of N2 for any integer N2 (+|-) '!' Calculate the factorial for any integer N1 (round if real) 'c' Clear (N1, N2) 'cL' Clear the memory list of all values. 'h' Help 'l' List all the values currently in List () 'q' Quit 'o' Output the last calculation results to the screen. 'a' Average of the values in list [] 'd#' Delete the value at the index # in List [] 'm#' Memorize (save) the last calculation result at index # in list. 's' Sum all the values in List [] 'sd' Calulate the standard deviation in the list [] 'p' Calculate the product of the values in the list 'M1' Prompt for index '#' and store N1 into list[#] 'M2' Prompt for index '#' and store N2 into list[#] 'N1' Prompt for index '#' and store List[#] into N1 'N2' Prompt for index '#' and store List[#] into N2 Enter Command: fi Please enter a filename to open: nofile Thank you. Attempting to open file nofile Error: Could not open file. Enter Command: fi Please enter a filename to open: fubar.txt Thank you. Attempting to open file fubar.txt Records: 0 Error: Data Error in the file. Enter Command: fi Please enter a filename to open: bohica.txt Thank you. Attempting to open file bohica.txt Records: 4 Error: Unexpected end of file. (Insufficient data) Enter Command: fi Please enter a filename to open: bad_data.txt Thank you. Attempting to open file bad_data.txt Records: 0 Error: Data Error in the file. Enter Command: fi Please enter a filename to open: snafu.txt Thank you. Attempting to open file snafu.txt Records: 4 4 items read from file... 3: 10 4: 28 5: 19 6: 67 Enter Command: + '+' Add (N1 + N2) Enter Command: - '-' Subtract (N1 - N2) Enter Command: * '*' Multiply (N1 * N2) Enter Command: / '/' Divide (N1 / N2) Enter Command: ^ '^' Raise any real N1 to the power of N2 for any integer N2 (+|-) Enter Command: ! '!' Calculate the factorial for any integer N1 (round if real) Enter Command: a 'a' Average of the values in list [] Enter Command: b NO_COMMAND Enter Command: c 'c' Clear (N1, N2) 'cL' Clear the memory list of all values. Enter Command: d 'd#' Delete the value at the index # in List [] Enter Command: e 'e' to enter N1 and N2 Enter Command: f No command recognized Enter Command: g NO_COMMAND Enter Command: i 'i' to enter a list of values (Q to stop) Enter Command: j NO_COMMAND Enter Command: k NO_COMMAND Enter Command: l 'l' List all the values currently in List () Enter Command: m 'm#' Memorize (save) the last calculation result at index # in list. Enter Command: n NO_COMMAND Enter Command: o 'o' Output the last calculation results to the screen. Enter Command: p 'p' Calculate the product of the values in the list Enter Command: r NO_COMMAND Enter Command: s 's' Sum all the values in List [] 'sd' Calulate the standard deviation in the list [] Enter Command: t NO_COMMAND Enter Command: u NO_COMMAND Enter Command: v NO_COMMAND Enter Command: w NO_COMMAND Enter Command: x NO_COMMAND Enter Command: y NO_COMMAND Enter Command: z NO_COMMAND Enter Command: q Bye, Bye![06:33] m695340m@cslab100:~/Documents/cs130/calc_project/assign17 $ exit exit Script done on Wed 18 Mar 2009 06:33:17 AM EDT