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
Until 2015, each new Roblox user automatically had one friend. What was he called?
RUDIKE [14]

Until 2015, each new Roblox user automatically had one friend and the friend was called Builderman

Builderman is the friend that is provided automatically for all users until 2015

<h2>Further Explanation</h2>

The builderman welcomes each new Roblox user, send a message to them and automatically follows every user until when it was discontinued in 2014. The role of the Builderman was to introduce the game experience to each new Roblox user.

Roblox is an online game and serves as a platform where users can also create their own games. Roblox gives its users the platform to design their own games and allow its user to different kinds of games that are created by other users on the platform

Roblox hosts numerous games designed by its users and virtual worlds which covers different genres, such as traditional racing, obstacle courses and many more.

Roblox has millions of users worldwide, its monthly active users are over 100million. Roblox also allows its users to create virtual items for sale. This also implies, its users can create virtual items and sell them for other users

Roblox was founded by David Baszucki and Erik Cassel; it was released on September 1, 2006. It is a platform that allows single-player and multiplayer.

LEARN MORE:

  • Until 2015, each new Roblox user automatically had one friend. What was he called?  brainly.com/question/12694552
  • What is the programming language of Roblox called?  brainly.com/question/13166316

KEYWORDS:

  • roblox
  • builderman
  • friend
  • message
  • automatically
  • david baszucki
  • erik cassel
6 0
3 years ago
Read 2 more answers
Why did hockey champion Haley wickenheiser feel angry after the Bach said the IOC would make a decision in the next month?
aliina [53]

Haley wickenheiser felt angry after the Bach said the IOC would make a decision in the next month as the IOC says the games will be held no later than summer 2021 but they will still be called the 2020 Tokyo Olympics.

Explanation:

  • The Tokyo Olympics were postponed until 2021 on Tuesday, ending weeks of speculation that the games could not go ahead as scheduled because of the coronavirus pandemic.
  • The International Olympic Committee made the decision after speaking with Japanese Prime Minister Shinzo Abe and local organizers.
  • The IOC said the games will be held not later than summer 2021 but they will still be called the 2020 Tokyo Olympics.
  • “President Bach said he will agree ‘100%,’ and we agreed to hold the Tokyo Olympics and Paralympics in the summer of 2021 at the latest,” Abe said, saying holding the games next year would be “proof of a victory by human beings against the coronavirus infections.”
  • The decision came only a few hours after local organizers said the torch relay would start as planned on Thursday.
4 0
3 years ago
Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolut
STALIN [3.7K]

Solution :

x = float_(input())

y = float_(input())

z = float_(input())

res1 = x**z

res2 = x**(y**z)

res3 = abs(x-y)

res4 = (x**z)**0.5

print('{:.2f} {:.2f} {:.2f} {:.2f}'.format(res1,res2,res3,res4))

Output is :

5.0

1.5

3.2

172.47 361.66 3.50 13.13

6 0
3 years ago
Describe one activity that belongs to the organizing phase software engineering.
Lera25 [3.4K]

Answer:

can you be more specific

Explanation:

5 0
3 years ago
Read 2 more answers
Who is better at fortnite mc creamy or mau?
Mama L [17]

Answer:

neither

Explanation:

fortnite sucks

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is one way for an entrepreneur to decrease risk?
    8·1 answer
  • A type of cpu socket, used with modern intel processors, where the cpu itself has no pins but the contact pads of the cpu line u
    8·2 answers
  • What these large numbers in unemployment could mean long term for America?
    6·1 answer
  • Advantage and disavantage of malware maintenance
    12·1 answer
  • Define networks, marketplaces, and platforms and discuss their differences.
    15·1 answer
  • What do u say to your bf if he says sayy lesssss
    14·2 answers
  • Cynthia realized that she used a wrong term throughout her paper. Which option can help her quickly correct her mistake?
    5·1 answer
  • New trends, tools, and languages emerge in the field of web technology every day. Discuss the advantages of these trends, tools,
    15·1 answer
  • What can happen if you do not follow the directions when cooking or baking? (Give 4 examples in a sentence each)
    8·1 answer
  • Differenciate between foreign key and primary key in database.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!