+ 3

This program is based on C++ and the output is [ 0 1 0] how to Z's value 0 ?

#include <iostream> using namespace std; int main() { int x=0,y=0,z=1; if(z=x<y){ x+=3; y-=1; } else x=y++; cout<<"x="<<x<<"y="<<y<<"z="<<z; return 0; }

10th Sep 2017, 6:49 PM
Anuj kumar
Anuj kumar - avatar
1 ответ
+ 3
well my output is correct i just want to know how the value become zero of (z) ?
11th Sep 2017, 6:28 AM
Anuj kumar
Anuj kumar - avatar