Hello I wrote this program to except user input parameters for a complex number in polar from then convert them to a + jb format. But I used the cos() function in the math.h libbary and it keeps giving me the answer in radians not in dergees. For example if I input the paratmerers Z=1 and Theta=90 it should return 0+1j but it does'nt it gives me -0.448074+51.222233j instead. Can someone please point out to me where I am making a mistake and how to fix it.
Thank you.

Code:
int main()
{
float Real, Complex, Z, Theta;
float pi;

pi = 3.141592654;

scanf("%f",&Z);

scanf("%f",&Theta);

Real = Z*(cos(Theta));

Complex = sin(Theta)*(180/pi);

if(Real > 0 && Complex > 0)
{
printf("The number is %f+%fj \n", Real, Complex);
}

if(Real > 0 && Complex < 0)
{
printf("The number is %f%fj \n", Real, Complex);
}

if(Real < 0 && Complex > 0)
{
printf("The number is %f+%fj \n", Real, Complex);
}

if(Real < 0 && Complex < 0)
{
printf("The number is %f%fj \n", Real, Complex);
}

return 0;

}

2. You said what the problem was: your angle is in degrees and cos() expects radians. So convert Theta to radians before trying to do cos() and sin().

3. You're converting the result of sin() - Complex = sin(Theta)*(180/pi);... That looks like a radians-to-degrees conversion but it's in the wrong place. And the wrong way around. The degrees-to-radians conversion should be made of the Theta argument to sin and cos.