|
|
#22 |
|
Away from Computer
|
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" ;
}
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.
__________________
|
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|