Question: 12. Write a C function void rect(int *ar, int *per, int len, int wid) that computes the area ar and perimeter per of a rectangle
12. Write a C function void rect(int *ar, int *per, int len, int wid)
that computes the area ar and perimeter per of a rectangle with length len and width wid. Test it with a main program that inputs the length and width of a rectangle and outputs its area and perimeter. Output the value in the main program, not in the procedure.
Sample Input 6 10 Sample Output Length: 6 Width: 10 Area: 60 Perimeter: 32
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
