By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,601 Members | 1,543 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,601 IT Pros & Developers. It's quick & easy.

boolean expression

P: 6
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.
Nov 14 '06 #1
Share this Question
Share on Google+
1 Reply


P: 2
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
Nov 14 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.