1. Write a program that calculates the area and perimeter of a rectangle. The program should include the following function. Do not modify the function prototype.
void area_perimeter(double width, double length, double *area, double *perimeter);
The function takes two parameters of double type for the width and length of the rectangle. The area parameter points to a variable in which the function will store the area of the rectangle. The perimeter parameter points to a variable in which the function will store the perimeter of the rectangle. The main function should ask the user to enter the width and length of the rectangle and call the area_perimeter function to calculate the area and perimeter. The main function should contain the printf statements that display the result.
2. Write a program that computes the sum and difference 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.
Complete the function that reads in two complex numbers.
void sum_diff(double *r3, double *i3, double *r4, double *i4);
The 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 store the sum of the two complex number in the variables pointed by r3, i3, and store the difference of the two complex number in the variables pointed r4, i4, respectively. The main function should call the sum_diff function and contain the printf statements that display the result with three decimal digits.