Program that prompts for input
Not what you're looking for?
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.
Purchase this Solution
Solution Summary
Write a program that prompts the user to input the x-y coordinate of a point in a Cartesian plane
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 && ...
Purchase this Solution
Free BrainMass Quizzes
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Basic Networking Questions
This quiz consists of some basic networking questions.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Javscript Basics
Quiz on basics of javascript programming language.