











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
by a logical operator ... Returns the opposite of the condition ... Returns TRUE if the conditions have opposite values. Logical Operations ...
Typology: Schemes and Mind Maps
1 / 19
This page cannot be seen from the preview
Don't miss anything!












Condition False True
Input: First Begin First=Second Output: “The values are not the same” End Input: Second Output: “The values are the same” False (^) True A Simple IF Statement
Weekly Paycheck with Overtime Example
Long-Distance Billing Example
Read 2 numbers and determine if they are equal or one is greater than the other. If the values are equal print a message saying they are equal. If not, print a message saying which one is largest.
Operator Description NOT Returns the opposite of the condition AND Returns TRUE if and only if both conditions are TRUE OR Returns TRUE if at least one of the conditions is TRUE XOR Returns TRUE if the conditions have opposite values Logical Operations
Evaluate each of the following compound conditions. Assume X = 3 and Y = 7. Your answer should be true or false.
Can we write (A<B<C)? NO!!
Example of Finding the Smallest Number Smallest Number- Four Solutions
Write a program that displays the smallest of five input values that may include duplicate values.