Prev Previous Post   Next Post Next
Old 10-7-2005, 02:43 PM   #22
chickendude
Away from Computer
FFR Simfile AuthorFFR Veteran
 
chickendude's Avatar
 
Join Date: Sep 2003
Location: Massachusetts
Age: 35
Posts: 1,901
Send a message via AIM to chickendude
Default 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.
__________________
chickendude is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 07:21 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution