+ 1

What is the diffrent between A and B ?

A : int x =10; if (× > 5 && x < 15) { cout << "yes"; } else { cout << "no"; } B: int x =10; if (x > 5 ) { if (x < 15) { cout << "yes"; } } else { cout << "no"; }

22nd May 2018, 2:22 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
1 Respuesta
+ 5
It can result in different machine code, but the operational behaviour stays the same.
22nd May 2018, 2:35 PM
Timon Paßlick