Write a c program to solve problem 4. I need bar1.c to solve this with good explanation Transcribed Image Text: Problem:
1. Define a C structure complx for a complex number with two data
members for the (real, imaginary) real and imaginary parts of the
complex number. It should be able to handle any real numbers! Use
typedef to make your program readable.
2. What we want to do next is to write a procedure to raise any complex
number to any integer power
(x + jy)”
Where x and y are real number and n is an integer!
3. What we want to do next is write (x + jy)as Re1e
where R = (x2 + y² ) and tan-1(0) = (2)
4. Then we can write (x + jy)” as R”eino and go back to write the result
as R”eime as (R”co s(n0) + jR” sin(n0))
5. In your procedure (function) you will use for-loop to compute the value
of R”. If you remember, we wrote very efficient programs to compute
the sin(x) and cos(x) functions. You may use those or include the
math library header file and use the trig functions
[sin( ), cos( ) and tan( )]
and the square-root functions only!
6. Note that the tan(x) is multi-valued. So you should check to see that
you are in the right quadrant!
7. The function should print the result on the screen in the form
Ans: ( x, jy) which should also be the value returned by the function to
Be Very Happy.