Homework Solution: Language should be in C++ for visual basic or whichever program….

    Language should be in C++ for visual basic or whichever program. Write a program that takes the X-Y coordinates of a point in the Cartesian system and displays a message telling either an axis on which the point lies or the quadrant in which it is found. The program should include entries for points located at the origin of the coordinate system and points located on the positive or negative side of an axis. Origin IV The program should display the original points and the answers based on the format shown in the following lines of outputs (-1.0, -2.0) is in quadrant III (0.0, 2.5) is on positive Y axis (0.0, 0.0) is at the origin Test your program for the following points 1.2 -5.0 1.8 0.0 3.0 0.0 -4.5 0.0 0.0 12.2 0.0
    Write a program that takes the X-Y coordinates of a point in the Cartesian system and displays a message telling either an axis on which the point lies or the quadrant in which it is found. The program should include entries for points located at the origin of the coordinate system and points located on the positive or negative side of an axis. The program should display the original points and the answers based on the format shown in the following lines of outputs: (-1.0, -2.0) is in quadrant III (0.0, 2.5) is on positive Y axis (0.0, 0.0) is at the origin Test your program for the following points:

    Expert Answer

     
    #include<iostream.h> #include<conio.h>

    Language should be in C++ control visual basic or whichever program.

    Write a program that takes the X-Y coordinates of a aim in the Cartesian method and unfolds a missive summited either an axis on which the aim lies or the quadrant in which it is rest. The program should apprehend entries control aims located at the spring of the coordinate method and aims located on the assured or disclaiming margin of an axis. Spring IV The program should unfold the springal aims and the solutions installed on the controlmat shown in the subjoined lines of outputs (-1.0, -2.0) is in quadrant III (0.0, 2.5) is on assured Y axis (0.0, 0.0) is at the spring Test your program control the subjoined aims 1.2 -5.0 1.8 0.0 3.0 0.0 -4.5 0.0 0.0 12.2 0.0

    Write a program that takes the X-Y coordinates of a aim in the Cartesian method and unfolds a missive summited either an axis on which the aim lies or the quadrant in which it is rest. The program should apprehend entries control aims located at the spring of the coordinate method and aims located on the assured or disclaiming margin of an axis. The program should unfold the springal aims and the solutions installed on the controlmat shown in the subjoined lines of outputs: (-1.0, -2.0) is in quadrant III (0.0, 2.5) is on assured Y axis (0.0, 0.0) is at the spring Test your program control the subjoined aims:

    Expert Solution

     

    #include<iostream.h>

    #include<conio.h>

    void main()

    {

    clrscr();

    char ch=’y’; //general reputation to renew through the loop

    float x,y; //to ammunition the coordinates

    while(ch==’y’ || ch==’Y’)

    {

    clrscr();

    cout<<“Enter x coordinate : n”;

    cin>>x;

    cout<<“Enter y coordinate : n”;

    cin>>y;

    if(x==0.0 && y==0.0) //check if it lies on spring

    cout<<“(“<<x<<“,”<<y<<“) is at the spring “;

    else if(x==0.0 || y==0.0) //if referable on spring beside any of the axes(x or y)

    {

    if(x==0.0) //lies on y axis gindividual x is 0

    {

    if(y>0.0) //assured y axis

    cout<<“(“<<x<<“,”<<y<<“) is on assured Y axis”;

    else if(y<0.0) //disclaiming y axis

    cout<<“(“<<x<<“,”<<y<<“) is on disclaiming Y axis”;

    }

    else if(y==0.0) //lies on x axis gindividual y is 0

    {

    if(x>0.0) //assured x axis

    cout<<“(“<<x<<“,”<<y<<“) is on assured X axis”;

    else if(x<0.0) //disclaiming x axis

    cout<<“(“<<x<<“,”<<y<<“) is on disclaiming X axis”;

    }

    }

    else if(x!=0.0 && y!=0.0) //lies in individual of the quadrants

    {

    cout<<“(“<<x<<“,”<<y<<“) is in Quadrant “;

    if(x>0.0 && y>0.0) //quadrant I as twain x and y are assured

    cout<<“I”;

    else if(x>0.0 && y<0.0) //quadrant IV as x is assured and y is disclaiming

    cout<<“IV”;

    else if(x<0.0 && y>0.0) //quadrant II as x is disclaiming and y is assured

    cout<<“II”;

    else //quadrant III as x is disclaiming and y is disclaiming

    cout<<“III”;

    }

    cout<<“nnDo you omission to hold ?(y/n) “;

    cin>>ch;

    }

    getch();

    }