#include
#include
int main() { int num[] = { 1,2,3,4,5,5,6,4,3,2,1 }; int temp = 0; for (int i = 0; i < 11; i++) { temp = temp ^ num[i]; //连续异或 } printf("%d\n",temp); system("pause"); return 0; }
最终结果为6,实验无误。
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/226401.html原文链接:https://javaforall.net
