Question: . A complex number has two parts: a real part and an imaginary part. These numbers are written A + Bi where i = (

.

A complex number has two parts: a real part and an imaginary part. These numbers are

written

A

+

Bi

where

i

= (

-

1). For example 3+4

i

and 1

-

2

i

are complex numbers.

Write a class d

eclaration (with just

member

function prototypes

) that enables

multiplication, addition

,

subtraction

, input and output

of complex number objects

using

regular arithmetic

(+,

-

, *, /)

and stream insertion/extraction

operators

(<<, >>).

Write a main() func

tion that instantiates objects of Complex class and inputs, adds,

subtracts, multiplies, divides, and outputs objects of type Complex using these operators

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!