RE: Re: RE: Re: C++ Help
You messed up your logic for the x and y axis stuff...
Should be:
input x, input y
if x==0 and y==0
then output "origin"
else if x==0 and y!=0
then output "y-axis"
else if y==0 and x!=0
then output "x-axis"
else if x > 0 and y > 0
then output "first quadrant"
else if x < 0 and y > 0
then output "second quadrant"
else if x<0 and y<0
then output "third quadrant"
else if x>0 and y<0 then output "fourth quadrant"
That is far from tedious as far as code goes...
-----Soccr743-----
You messed up your logic for the x and y axis stuff...
Should be:
input x, input y
if x==0 and y==0
then output "origin"
else if x==0 and y!=0
then output "y-axis"
else if y==0 and x!=0
then output "x-axis"
else if x > 0 and y > 0
then output "first quadrant"
else if x < 0 and y > 0
then output "second quadrant"
else if x<0 and y<0
then output "third quadrant"
else if x>0 and y<0 then output "fourth quadrant"
That is far from tedious as far as code goes...
-----Soccr743-----

:

. You just need a space between the two numbers when you input them.


Comment