Question: Program using C. Write a program complex_multiply.c that computes the multiplication of two complex numbers. In the function, r represents the real component and i
Program using C.
Write a program complex_multiply.c that computes the multiplication of two complex numbers. In the function, r represents the real component and i represents the imaginary component. The program should include the following function. Do not modify the function prototype.
void mutliply(double r1, double i1, double r2, double i2, double *r3, double *i3);
The main function should prompt for the user to enter the real component and imaginary component of the first complex number and the second complex number and call the multiply function to calculate the multiplication of the two complex numbers.
The multiply function computes the multiplication of the two complex number passed in the variables r1, i1, r2, i2. The function stores the multiplication of the two complex number in the variables pointed by r3, i3, respectively. The main function should contain printf statements that display the result with three decimal digits.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
