Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Boolean Algebra; Help!

Name: Anonymous 2008-03-06 16:51

#include <iostream>

using namespace std;

int main()

{
   
    float number;
   number = 9;
    if (number == 2 || 3)
    {cout<<"\n\nRight!";}
    else{cout<<"Wrong";}
    cin.get();
   
}


This script (in my understnding) should display "Wrong", it actually displays "Right"

Help?

Name: Anonymous 2008-03-06 17:05

>>8
It's a waste of a vertical line, it also looks like shit.  If anything, put the return type on a line of its own and make sure the function's name starts on the first column so functions can easily be found with grep ^function.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List