subject

Suppose a graphics program needs a function to indicate whether one rectangle is smaller than another rectangle. A rectangle is specified by its upper-left coordinate and bottom-right coordinate. If the first rectangle is (1, 1) and (2,3), and the second is (0,0) and (10,10), the function returns true. HINTS
• Use copy paste to ensure your parameters exactly match the arguments. You can use the same names for parameters as the arguments.
• Declare local variables r1 Area and r2 Area to make your comparison expression simpler.
• Use the abs() function in cstdlib (requires #include).
• Take great care to check and recheck that your calculations involve the correct values.
Lab Functions: Rectangles sizes
Activity
main. cpp
1 #include 2 #include 3 using namespace std;
4
5 Type your code here */
6
7
8 int mainot
9 int Pixul, riyul, ribe, riyor; // x upper-left, y upper-left, x botton-right, y bottom-right
10 int r2xul, rzyul, r2xbr, rzybr;
11
12 cin >> rixul; cin >> riyul; cin >> rlxr; cin >> riyor;
13 cin >> rxul; cin >> rZyul; cin >> r2xr; cin >> rzybr;
14
15 cout << , riyul, rixbr, riyor, r2xul, r2yul, r2xor, rzybr) << endl;
16
17 return;
18

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
When is an original work considered public domain? a. when posted via social media b. when it is posted on the internet c. when a copyright symbol is not included with the piece of work d. when explicit permission is given by the author / owner
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
question
Computers and Technology, 24.06.2019 07:30
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
You know the right answer?
Suppose a graphics program needs a function to indicate whether one rectangle is smaller than anothe...
Questions
question
Mathematics, 03.10.2019 00:00