Compiling and Testing

Compiling
g++ -Wall -ansi Lab08.cpp Complex.cpp -o Lab08.out


Run
linux3[22]% ./Lab08.out


Sample output
linux3[20]% ./Lab08.out
Enter the first complex number :
Real Part : 2
Imaginary Part : 3
Enter the second complex number :
Real Part : 5
Imaginary Part : -4
The Complex numbers you entered are :
First number : 2 + 3i
Second number : 5 - 4i
The negation of first number is : -2 - 3i
The negation of second number is : -5 + 4i
The addition of the two numbers is : 7 - 1i

linux3[21]% ./Lab08.out
Enter the first complex number :
Real Part : 0
Imaginary Part : 3
Enter the second complex number :
Real Part : -2
Imaginary Part : 5
The Complex numbers you entered are :
First number : 0 + 3i
Second number : -2 + 5i
The negation of first number is : 0 - 3i
The negation of second number is : 2 - 5i
The addition of the two numbers is : -2 + 8i