need help ASAP!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blamp
    New Member
    • Oct 2008
    • 4

    need help ASAP!

    cant get this code too print the correct message

    if (score >= 60)
    cout << "You pass." << endl;
    else;
    cout << "You fail." << endl;
  • boxfish
    Recognized Expert Contributor
    • Mar 2008
    • 469

    #2
    Try getting rid of the semicolon after the else. The compiler thinks it's an empty statement, meaning do nothing.
    Hope this helps.

    Please use code tags around your code. Put [CODE] before it and [/CODE] after it so it shows up in a code box and the indentation isn't wrecked. Thanks.
    Last edited by boxfish; Oct 22 '08, 12:33 AM. Reason: Code tags.

    Comment

    Working...