i need c to equal the square root of a squared + b squared but when i run the program it gives me the wrong value?
In terms of the parentheses the are all necessary.
Not sure what it is that you're trying to compute but it looks similar do a distance calculation.
|\
a | \ c
| \
|___\
b
_______
c = √a² + b²
If that's the case you need to move the addition of b*b inside the parentheses of the square root call. I honsestly think you're using way too many parentheses here. You're probably confusing yourself.
1 2
// Is this what you want?
c = sqrt(a * a + b * b);
If you are going to do it this way you should use atan2(y,x) rather than atan(x): you will get an answer in the correct quadrant (otherwise you will be wrong 50% of the time) and you won't crash when a = 0.
Given what you are doing you would be better with complex numbers: see the advice given to you in your other post.
What you have written in your answer line is also patently wrong: that is not a polar form. You want something like, e.g., cout << "Multiplication: " << c << " exp( " << d << " i)" << endl;
or, if you must, cout << "Multiplication: (modulus, argument) = (" << c << ", " << d << " )" << endl;
For complex numbers in polar form leave the angle in radians - there is no need for the extra multiplying factor of 57.2958, which would be incorrect once it is inside the complex exp().