- #1
Drao92
- 72
- 0
In an airplane there are 16 seats, 4 for the airplane crew (pilots) and 12 for travelers. I must write a logic function which is always one when the airplane crew is on their seats(4), how many people are in the airplane it doesn't matte (0-12)r.
My 1st idea is:
For each seat i define a variable a,b,c,d,..., a,b,c,d for the airplane crew. Then i make all the posible combinations when a,b,c,d ==1 and the rest is 0 and 1 in a logic table and then i find the function.
Is this correct?
My 2nd idea is:
If we care only about a,b,c,d isn't the function f=a*b*c*d which is 1 only when a,b,c,d is 1 :D ?
My 1st idea is:
For each seat i define a variable a,b,c,d,..., a,b,c,d for the airplane crew. Then i make all the posible combinations when a,b,c,d ==1 and the rest is 0 and 1 in a logic table and then i find the function.
Is this correct?
My 2nd idea is:
If we care only about a,b,c,d isn't the function f=a*b*c*d which is 1 only when a,b,c,d is 1 :D ?