Explore BrainMass

# Program that prompts for input

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

Write a program that prompts the user to input the x-y coordinate of a point in a Cartesian plane. The program should then output a message indicating whether the point is the orgin, is located on the x (or y) axis, or appears in a particular quadrant. For Example:

(0, 0) is the orgin
(4, 0) is on the x-axis
(0, -3) is on the y-axis
(-2, 3) is in the second quadrant

This is using the if....if else....switch......case.....statements.

https://brainmass.com/computer-science/control-structures/program-prompts-input-32525

#### Solution Preview

#include<iostream.h>

void main( )
{
int x;
int y;

cout<< "Please enter the x coordinate of the point : ";
cin>> x;
cout<< "Please enter the y coordinate of the point : ";
cin>> y;
cout << endl;

if (x==0 && ...

#### Solution Summary

Write a program that prompts the user to input the x-y coordinate of a point in a Cartesian plane

\$2.49