CS120
Programming Assignment #1, Part B

Due: Midnight, Sunday, January 28th.

For this assignment you will be creating a new program to perform very simple calculations for the user. The general format will be very similar to that for the Fortune Teller program, so feel free to reference that program for ideas.

The calculator program should work as follows:

If you can't complete the entire assignment be sure to describe you've completed in the comments at the beginning of the program. On the other hand if you did extra work on the assignment (and sometime you will want to) also describe the extra work in the comment at the beginning of the program.

Include a block of comments at the beginning of the programs (or add to the existing block) that lists your names, section number, date, and the assignment number. Also include comments on any parts of the assignment you didn't finish or on any extra work you did. Include this comment block at the beginning of every assignment and lab.

For now we are going to assume that the user enters the right type of data (e.g. a number for the starting value, a single name for their name). Later we will start to look at correcting user input errors - a big topic. You could try entering a letter instead of a number if you want - control X will stop the program.

To print the program output do the following:
1) Type script output1
2) Run the program.
2a) Rerun the program several times with different inputs and testing different opperations (addition, subtraction, etc). 3) When you feel you have tested the program sufficiently type exit, this stops the script command.
4) Look for a file called output1. Use nano or emacs to open the file and look at it. It should contain a 'transcript' of your program.
5) Do this for both programs, using different file names (e.g. output1 and output2).

Turn in: Print the program and sample output showing that the program works. Turn in both the program and the output.