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
What three characteristics of a function are described in an IPO chart? What is performed at each characteristic?
Blizzard [7]

Answer:

Input

Processing

Output

Explanation:

6 0
3 years ago
What are html documents also called?
11Alexandr11 [23.1K]
HyperText Markup Language
4 0
3 years ago
Which option ie an example of an html end tag
Kay [80]
Any end tag in HTML needs to look like this, the word body used in this example is one of the more important elements, but you can replace it to any real element in HTML:
i.e. </body>
8 0
3 years ago
A network administrator has been tasked with configuring access to the Internet for about 50 computers. The administrator has be
scoundrel [369]

Answer:

Proxy Server.

Explanation:

An administrator was given the responsibility of customizing Internet connection for around the numbers of computer systems. He stated the admin that those Internet connections need to go through a system connected to the internet because otherwise inbound and outbound traffic can still be examined but only that systems should have a Web address identified.

So, the admin configured Proxy Server because only certain systems have been identified the following address to the internet.

3 0
3 years ago
100 POINTS!!! PLEASE HELP ME
Ronch [10]

Answer:

1 web

2- invintory

3- spreadsheet

4-survey

Explanation:

hope it helps

5 0
2 years ago
Read 2 more answers
Other questions:
  • A dropped packet is often referred to as a _____________.
    7·1 answer
  • What are some options available when using the Replace feature?
    13·1 answer
  • Here is a Test Code segment:
    13·1 answer
  • Write the definition of a function named printstarbucks that receives a non-negative integer n and prints a line consisting of n
    6·1 answer
  • "The _____ of the Open Systems Interconnection (OSI) model generates the receiver’s address and ensures the integrity of message
    6·2 answers
  • What internal hardware device does a computer use to connect to a wired or a wireless network?
    10·1 answer
  • Who began digitizing books on a massive scale and putting them online?
    8·1 answer
  • In the code segment below, assume that the int variable n has been properly declared and initialized. The code segment is intend
    5·1 answer
  • Memory cache is referred to as ______. A. SRAM c. SROM b. DRAM d. DROM
    11·1 answer
  • If every company is now a technology company, then what does this mean for every student attending a business college
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!