0% found this document useful (0 votes)
29 views4 pages

Logical

Uploaded by

akshay ak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views4 pages

Logical

Uploaded by

akshay ak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 4

TRUTH TABLE

TRUE-1
AND
ALL COND MUST BE TRUE FALSE-0
COND1 COND2 RESULT
4YRS 0 0 FALSE FALSE
MASTERS 0 1 FALSE
1 0 FALSE
1 1 TRUE FALSE
TRUE
N>0 TRUE
ANY
OROF COND MUST BE TRUE N<0 TRUE
COND1 COND2 RESULT N==0 FALSE
0 0 FALSE
0 1 TRUE
1 0 TRUE
1 1 TRUE

SWITCH INPUT OPTIONS INVALID


X A
B
C
D

PROBLEM

AGE<18 NOT ELIGIBLE


AGE 25
WEIGHT 32 WEIGHT>50 ELIGIBLE
AGE<30
WEIGHT<50 NOT ELIGIBLE
WEIGHT>60 ELIGIBLE
AGE<50
WEIGHT<60 NOT ELIGIBLE

SOLUTION NESTED IF
NOT ELIGIBLE

45 #N/A
NOT XOR BOTH OF THE COND MUST BE DIFF
TRUE=FALSE
FALSE=TRUE COND1 COND2
0 0
0 1
1 0
1 1

90

IF NO
X

NESTED IF FOUR
A
B
C
D
RESULT
FALSE
TRUE
TRUE
FALSE
NAME MARK RESULT
DENNIS 12 A GRADE a
JAMES 78 C GRADE
JHONNY 67 C GRADE
TIM 45 B GRADE
BILL 34 A GRADE

CAR PARKING CHARGES


CAR REG NO HOURS PARKED PARKING CHARGE
TN 81 E 7857 6 1.50$ € 9.00
TN 81 H 4696 12 1$ € 12.00
TN 45 E 5656 8 1.50$ € 8.00
TN 81 E 7987 11 1$ € 11.00
TN 45 H 3578 5 FALSE € 5.00

You might also like