河南成教 / 面向对象程序设计
16[分析题]
#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)<<’ ’; }
16[分析题]
#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)<<’ ’; }
参考答案:
佳题速递: