Spring 1996
In addition, use your multiply and addition functions in a main program that takes input from the command line of the form:
program real_or_complex_number op real_or_complex_number
You can assume that complex numbers will be of the form {number}+i{number} (without spaces), and reals are the usual floating point numbers.
Here are some examples of valid input:
myprogram 5.0 times 4.4-i0.1
myprogram 4.4+i2.3 plus 0.0-i4.0
myprogram 4 plus 6.7
myprogram 4.4+i6.6 plus 4.0
Your program should print out the result as a complex number or a real
depending on the type.
Programming assignments are due before class on the assignment due date.
Late assignments will be levied a late penalty of 10% per day. Late assignments will only be accepted up to 4 days late.
Do not allow your work to be used by others:
Warning: If someone cheats by using your work, you will also be penalized
Page Created: Feb 6, 1995 Maintained by: Stan Sclaroff