赋值语句1

it2022-05-05  135

代码 #include  < iostream > using   namespace  std; int  main(){     int  x = 2 ,y,z;    x  *= (y = z = 5 ); cout << x << endl; // 10     z = 3 ;    x  ==  (y = z);    cout << x << endl; // 10     x  =  (y == z);    cout << x << endl; // 1     x  =  (y & z);    cout << x << endl; // 3     x  =  (y && z);    cout << x << endl; // 1     y  = 4 ;    x =  (y | z);    cout << x << endl; // 7     x  =  (y || z);    cout << x << endl; // 1     cin >> x;     return   0 ;}

 代码

 

 

转载于:https://www.cnblogs.com/ManMonth/archive/2010/09/19/1830757.html


最新回复(0)