1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sergeu [11.5K]
3 years ago
11

In mathematics, "quadrant I" of the cartesian plane is the part of the plane where x and y are both positive. Given a variable,

p that is of type POINT-- a structured type with two fields, x and y, both of type double-- write an expression that is true if and only if the point represented by p is in "quadrant I".
Computers and Technology
1 answer:
lbvjy [14]3 years ago
5 0

Answer:

#include <iostream>

using namespace std;

struct Cartesian {

double x;

double y;

};

int main() {

// creating a pointer p of type struct Cartesian

struct Cartesian *p = new Cartesian ;

cout << " Enter x: ";

// accessing the structure variable x by arrow "->"

cin >> p->x;

cout << "Enter y: ";

// accessing the structure variable y by arrow "->"

cin >> p->y;

// expression to check whether x and y lie in Quadrant 1

if (p->x > 0 && p->y > 0) {

 cout << "X and Y are in Quadrant 1 ";

}

else

{

 cout << "x And y are not in Quadrant 1";

}

// deleting the struct pointer p

delete p;

return 0;

}

Explanation:

in order to locate memory in heap, keyword "new" is used in C++ so,

struct Cartesian *p = new Cartesian ;

in order to access data members of the structure using pointer we always use an arrow "->". otherwise a dot oprerator is used to access data members.

in order to check whether x and y lie in 1st quadrent, we must use && operator in our if condition. so

if (p->x > 0 && p->y > 0)

&& will return true iff x and y both are +ve.

deleting the struct pointer p is important beacuse we are allocating memory in heap so heap memory should be used a resource and must be release when not needed otherwise it can cause memory leakage problems. so  

delete p;

You might be interested in
Write measure five safety measures can be taken to stay safe in social media​
alexdok [17]

Answer:

  1. <u>Use a strong password</u>.
  2. <u>Use a different password for each of your social media accounts</u>.
  3. <u>Set up your security answers. </u>
  4. <u>If you have social media apps on your phone, be sure to password protect your device.</u>
  5. <u>Be selective with friend requests. </u>

5 0
2 years ago
Read 2 more answers
Think about what you have learned about work ethic. In a paragraph of no less than 125 words, explain why employers prefer to hi
Zepler [3.9K]

An individual who possesses good work ethic embodies principles like reliability, dependability, dedication to the job, teamwork and cooperation, and a self-disciplined character. Most employers seek a strong work ethic; performance depends on it; satisfaction is derived from it; and it ensures career progression. It is that untouchable effort an employee exemplifies daily, regardless of whether someone is watching or not. A company that has its employees doing exemplary well has everything to do with their performance. Thus, if you have a strong work ethic, you will have qualities that will keep you in demand by huge companies. When you are skilled at the workplace and your colleagues notice and appreciate it, you will have a very deep sense of satisfaction within you. If you put 101 percent, your willingness to work hard will be recognized and will leave you shining brightly than others when the opportunity of promotion knocks.

7 0
3 years ago
Choose the correctly written sentence.
Lemur [1.5K]

Answer:

i would say the first one

Explanation:

7 0
2 years ago
Read 2 more answers
Which subscription option, if any, includes online banking, access from any device at any time, and integration with a wide rang
max2010maxim [7]

Answer:

The correct answer is: All QuickBooks Online subscription levels.

Explanation:

QuickBooks is an online accounting software that allows companies to handle their book-keeping just like accountants do on paper but storing the information in a hub. In that way, executives of a firm can have access to that information easily wherever they are since most operations can be synchronized to be done with mobile devices.

Features such as online banking and integration to mobile apps are included from QuickBooks' basic plans.

7 0
3 years ago
Read 2 more answers
Select the correct answer from each drop-down menu.
gtnhenbr [62]

Answer:

Cloud computing allows users to sell computing resources and follows the pay once use multiple times payment model.

Explanation:

If you sell u pay once and always use.

5 0
3 years ago
Read 2 more answers
Other questions:
  • ?the single most effective security measure for digital devices is to password protect access to them.
    5·1 answer
  • How many people watch Anime in the world?
    15·2 answers
  • The ________ method displays a message to the user and contains one button.
    6·1 answer
  • EDI stands for__________________ a) Electronic digital interface b) Electronic data interchange c) Enterprise data interface d)
    5·1 answer
  • Fill this blanks with the given words​
    6·1 answer
  • PLZZZZZZZZZZ HELP ME OUT THIS DUE TODAY AND NEED SOMEONE HELP!!!!!plzzzzzzzzzzz i begging you!!!
    11·1 answer
  • Which decimal number is equivalent to the hexadecimal number F1?
    14·1 answer
  • ¿Cuál es la función que cumplía los sofistas y Porque eran tan importantes?​
    13·1 answer
  • You've just installed a new video card in a user's Windows workstation. When the system is powered on the screen is blank. You
    10·1 answer
  • Hosts on the Internet have ________ addresses. Group of answer choices both A and B neither A nor B IP data link
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!