boolean expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaloshi
    New Member
    • Nov 2006
    • 6

    #1

    boolean expression

    Hi I just began taking this class in C++, and I have an assignmetn to represent conditions as boolean expressions. For example:

    condition: payment must be at least 250.00 dollars
    solution: min _pmt > = 250.00

    How would you represent : force must be at least 30 and at most 50????

    Also how would you represent : income must be at most 25,000, number of dependents must be at least 3, and medical expenses must be at least 5,000
    Thank you if anyone could please reply I would be very glad.
  • dicapryl
    New Member
    • Nov 2006
    • 2

    #2
    Originally posted by kaloshi
    How would you represent : force must be at least 30 and at most 50????.
    (force >= 30 && force<=50);

    '&&' ensures that force has to satisfy both conditions. Or.. both conditions must be true for the following executions to work.

    :)

    -dicapryl

    Comment

    Working...