• 0

Very easy [C] question regarding range of numbers


Question

3 answers to this question

Recommended Posts

  • 0

@Bliksem: == does not assign anything, it compares.

@hdood: if grosspay == 99.5, your statement will return true but 99.5 < 100

if( (grosspay > 100) && (grosspay < 199) )

{

grosspay -= 2;

}

If you want inclusive, use >= and <= in place of > and < respectively.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.