Question
Write a class for complex numbers, defining the following operations for an
instance of the class:
- Read the number.
- Write the number.
- Add to another complex number, and return the result.
- Multiply by another complex number, and return the result.
Write a program that prompts the user to read two complex numbers, and then
computes and outputs their sum and product.
Answer