#include<stdio.h>
int main()
{
/*int a = 1;
int b = 2;*/
int a = 0;
int b = 0;
scanf("%d,%d",&a,&b);
a = a^b;
b = a^b;
a = a^b;
printf("%d,%d",a,b);
getchar();
return 0;
}
不创建临时变量交换两个变量的内容
最新推荐文章于 2024-01-27 15:39:57 发布
#include<stdio.h>
int main()
{
/*int a = 1;
int b = 2;*/
int a = 0;
int b = 0;
scanf("%d,%d",&a,&b);
a = a^b;
b = a^b;
a = a^b;
printf("%d,%d",a,b);
getchar();
return 0;
}