1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <iostream> using namespace std; int main(){ unsigned short x,y; cin>>x>>y; x=(x|x<<2)&0x33; x=(x|x<<1)&0x55; y=(y|y<<2)&0x33; y=(y|y<<1)&0x55; unsigned short z=x|y<<1; cout<<z<<endl; return 0; } |
假设输入的 x、y 均是不超过 15 的自然数,完成下面的判断题和单选题:
0 of 6 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 6 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
1、删去第7行与第13行的unsigned,程序行为不变。( )
2、将第7行与第13行的short均攺为char,程序行为不变。( )
3、程序总是输出一个整数”0″。( )
4、当输入为”2 2″时,输出为”10″
5、当输入为”2 2″时,输出为”59″( )