Question: Kindly use C programming Objectives: Learn about conditional statements and Boolean operators. Problem: Let R and S be two rectangles in the xy-plane whose sides
Kindly use C programming Objectives: Learn about conditional statements and Boolean operators. Problem: Let R and S be two rectangles in the xy-plane whose sides are parallel to the coordinate axes. Each rectangle is described by its center and its height and width. Determine if R and S overlap. Example: 1) Suppose R is the rectangle centered at the origin height and width equal to one and S is the rectangle centered at the point (1,1) with a height equal to 2 and width equal to 3. Then L and S overlap. 2) Suppose R is the rectangle centered at the origin height and width equal to one and S is the rectangle centered at the point (100,100) with a height equal to 2 and width equal to 3. Then L and S do not overlap. Bonus: If two given rectangles as described above overlap, their intersection forms a new rectangle. Further determine its center, height, and width
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
