0

why is OR and And may be chained together

8th May 2017, 8:59 PM
TMS
3 Respostas
0
say you need apples or bananas heavier than 1 kg if ( ( fruit.isBanana() || fruit.isApple()) && fruit.weight>=1000 //grams) { eat(); } this way you wont be eating a 2Kg tomato just because it's heavier than 1kg
8th May 2017, 9:07 PM
Anderson Palma
Anderson Palma - avatar
0
Thanks
19th May 2017, 12:46 PM
TMS
0
c++ recursion how did we get 120 while fact 5 result count from back 5*4*3*2*1?
19th May 2017, 12:46 PM
TMS