Question: PLEASE HELP ME FIX THE FOLLOWING ERRORS! error: 'Complex' was not declared in this scope error: expected ';' before 'z1' error: expected ';' before 'z2'

PLEASE HELP ME FIX THE FOLLOWING ERRORS!

error: 'Complex' was not declared in this scope

error: expected ';' before 'z1'

error: expected ';' before 'z2'

error: expected ';' before 'z3'

error: expected ';' before 'z4'

error: expected ';' before 'z5'

error: expected ';' before 'z6'

error: expected ';' before 'z7'

#include

#include "complex.h"

#include

using namespace std;

int main(int argc, char **argv)

{

Complex z0(3.6,4.8);

Complex z1(4,-2);

Complex z2(-4,2);

Complex z3(-4,-3);

Complex z4(3,-4);

Complex z5;

Complex z6;

Complex z7;

double ang;

cout<<"z0 = "<

<<"im(z0) = "<

cout<<"z1 = "<

cout<<"z2 = "<

cout<<"z3 = "<

cout<<"z4 = "<

cout<<"z2 x z3 = "<

cout<<"z1 + z2 = "<

cout<<"z3 = "<

cout<<"z4 = "<

cout<<"z3-z4 = "<

cout<<"((z2+z3)x(z3-z4)) = ";

cout<<(z2+z3)*(z3-z4)<

cout<<"z1^3 = "<

cout<<"1/z2^2 = "<

cout<<"z3^0 = "<

try

{

cout<<"((z2+z3)x(z3-z4))/z3 = ";

z6 = ((z2+z3)*(z3-z4))/z3;

cout<

cout<<"z3 / z4 = "<<(z3/z4)<

cout<<"Conj(z4) = "<

cout<<"The real part of the conjugate of z4 is "<<(z4.conjugate()).getReal()<

cout<<"The imaginary part of the conjugate of z4 is "<<(z4.conjugate()).getImag()<

cout<<"The argument of the conjugate of z4 is "<<(z4.conjugate()).argument()<<"."<

cout<<"The modulus of the conjugate of z4 is "<<(z4.conjugate()).modulus()<<"."<

cout<<"(z3*conj(z4))/(z4*conj(z4))= ";

cout<<(z3*z4.conjugate())/(z4*z4.conjugate())<

complexresult = ((z1-z2) * (z3/z4)) / (z4/z3);

cout<<"result = "<

ang = (z1+z2).argument();

cout<<"angle = "<

/* The result of the expression is the angle between z1-z2 and z3/z4, divided by the angle between z4/z3 and the x-axis.

*/

}

catch(int e)

{

if (e == -1)

cerr<<"DivideByZero Exception in / operator"<

else if (e == -2)

cerr<<"DivideByZero Exception in argument function"<

}

return 0;

}

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!