+ 3
#include <iostream> using namespace std; int main() { int x=5 , y=6; if (++x>4 ||++y<8) { cout <<x<<y<<endl;
here output is 66 . Why not 67 while ++x=6 and ++y=7 ?
6 ответов
+ 8
Because in C++ if the first statement of OR is true, other ones won't be checked.
++x>4 -> true, so the whole expression gives us true, no need to check the following ones
+ 3
MarJan
I was confused as well, but you cleared my doubts.
Thanks man
+ 2
thank you !
+ 2
for(i=1,i<=20,i++)
0
яхз
- 1
hsbxbxnskskshdbndnakajdbdjdjsns