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
stellarik [79]
2 years ago
8

Write a program that takes a point (x,y) from theuser and find where does the point lies. The pointcan

Computers and Technology
1 answer:
agasfer [191]2 years ago
4 0

Answer:

C++ Program .

#include<bits/stdc++.h>

using namespace std;

int main()

{

int x,y;//declaring two variables x and y.

string s;//declaring string s..

cout<<"enter x and y"<<endl;

cin>>x>>y;//taking input of x and y..

if(x>=0 &&y>=0) //condition for 1st quadrant..

cout<<"the point lies in 1st Quadrant"<<endl;

else if(x<=0 &&y>=0)//condition for 2nd quadrant..

cout<<"the point lies in 2nd Quadrant"<<endl;

else if(x>=0 &&y<=0)//condition for 3rd quadrant..

cout<<"the point lies in 3rd Quadrant"<<endl;

else //else it is in  4th quadrant..

cout<<"the point lies in 4th Quadrant"<<endl;

cout<<"enter n to terminate the program"<<endl;

while(cin>>s)//if the user has not entered n the program will not terminate..

{

   if(s=="n")

   {

       cout<<"the program is terminated"<<endl;

       exit(0);

   }

   cout<<"you have not entered n please enter n to terminate the program<<endl;

}

}

Explanation:

The above written program is for telling the point lies in which quadrant.I am first declaring two variables x and y.Then after that taking input of x and y after that checking in which quadrant the point lies.

Taking input of the string s declared earlier for program termination the program will keep running until the user enters n.

You might be interested in
Hi there are many annoying people in brainly making my head ache
iris [78.8K]

Answer:

Lol who is bothering you?

Explanation:

4 0
2 years ago
Read 2 more answers
What are some cowboy ethics??
lys-0071 [83]

Answer:

giv meh a min plsssss

Explanation:

4 0
3 years ago
cell d1 contains the value 7.877 you want cell d1 to display this value as 7.9 how can you accomplish
Georgia [21]

Answer:

You round?

Explanation:

6 0
3 years ago
Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
Salsk061 [2.6K]

Answer:

import java.util.Scanner;

public class NestedLoops {

   public static void main (String [] args) {

       Scanner scnr = new Scanner(System.in);

       int numRows;

       int numColumns;

       int currentRow;

       int currentColumn;

       char currentColumnLetter;

       numRows = scnr.nextInt();

       numColumns = scnr.nextInt();

       for (currentRow = 0; currentRow < numRows; currentRow++) {

           currentColumnLetter = 'A';

           for (currentColumn = 0; currentColumn < numColumns; currentColumn++) {

               System.out.print(currentRow + 1);

               System.out.print(currentColumnLetter + " ");

               currentColumnLetter++;

           }

       }

       System.out.println("");

   }

}

4 0
3 years ago
World wide web is another name for Internet <br> True or false?
Nutka1998 [239]

Answer:

False

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • In this lab, 172.30.0.0 represents the __________ network and 10.20.1.0 represents the _________ network.
    11·1 answer
  • Ryan is working on the layout of her web page. She needs to figure out where her header, navigation bar, text, and images should
    14·2 answers
  • How to create a distribution list in outlook?
    7·1 answer
  • How are authentication and authorization alike and how are they different? what is the relationship, if any, between the two\?
    7·2 answers
  • Name the technique used to separate the mixture of colours in black ink ​
    9·2 answers
  • Which of the following activities does an effective team do?
    15·2 answers
  • For those that play pc games how do you go outside in The Sims 2?
    7·2 answers
  • Could anyone beat my typing?<br><br> https://keyma.sh/custom/33K7C
    5·1 answer
  • For 8.6 code practice: Question 1 It keeps says it's an infinite loop and it will not work can someone give me the code that wil
    9·1 answer
  • Each high-level language has its own __________, or rules of the language. group of answer choices
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!