方法一
#include <stdio.h>
#include <stdlib.h>
int main() {
int a=5, b=6,c;
c = a;
a = b;
b = c;
printf("%d,%d\n", a, b);
system("pause");
return 0;
}
方法二
#include <stdio.h>
#include <stdlib.h>
int main() {
int a=5, b=6;
a = a + b;
b = a - b;
a = a - b;
printf("%d,%d\n", a, b);
system("pause");
return 0;
}
方法三
#include <stdio.h>
#include <stdlib.h>
int main() {
int a=5, b=6;
a = b - a;
b = b - a;
a = b + a;
printf("%d,%d\n", a, b);
system("pause");
return 0;
}