河南成教 / 面向对象程序设计
8[分析题]
#include<iostream.h> void main() { int x=10,y=-1; cout<<((x>y)&&(y<0))<<’ ’; cout<<((x>y)||(y<0))<<’ ’; cout<<((x<=y)&&(y>=0))<<’ ’; cout<<((x<=y)||(y>=0))<<’ ’; cout<<((x==y)&&y)<<’ ’; cout<<((x==y)||y)<<’ ’; }
8[分析题]
#include<iostream.h> void main() { int x=10,y=-1; cout<<((x>y)&&(y<0))<<’ ’; cout<<((x>y)||(y<0))<<’ ’; cout<<((x<=y)&&(y>=0))<<’ ’; cout<<((x<=y)||(y>=0))<<’ ’; cout<<((x==y)&&y)<<’ ’; cout<<((x==y)||y)<<’ ’; }
参考答案:
佳题速递: