10-7-2005, 02:43 PM
|
#40
|
|
Away from Computer

Join Date: Sep 2003
Location: Massachusetts
Age: 35
Posts: 1,901
|
Re: RE: Re: RE: Re: C++ Help
Code:
#include <iostream>
main()
{
using std::namespace
int x,y;
cout << "enter an x and a y \n";
cin >> x >> y;
if (x==0 && y==0)
cout << "origin";
if (x==0 && y!=0)
cout << "y-axis";
if (y==0 && x!=0)
cout << "x-axis";
if (x > 0 && y > 0)
cout << "first quadrant";
if (x < 0 && y > 0)
cout << "second quadrant";
if (x<0 && y<0)
cout << "third quadrant";
if (x>0 && y<0)
cout << "fourth quadrant" ;
}
ok stupid conditionals parentheses >_<
silly me
anyway, even though its too late I feel the need to fix it
you can do a main without a return I believe.
__________________
|
|
|