Question: Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have the form real + i imag, where i = v-1. Use
Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have the form real + i imag, where i = v-1. Use floating point variables to represent the private data of the class. Provide a constructor to initialize a complex number when it is declared. The constructor should contain the default values in case no initializing values are provided.
Provide public member functions to perform the following operations:
· Addition of two Complex numbers
· Subtraction of two Complex numbers
· Multiplication of two Complex numbers
· Printing of a Complex number in a+ib format
Step by Step Solution
3.34 Rating (151 Votes )
There are 3 Steps involved in it
Solution include include using namespace std class complex float real float imag p... View full answer
Get step-by-step solutions from verified subject matter experts
