C#学習ノート--2つのデータの交換
1074 ワード
// 。 0, 1, , ,
//
int s;
x = x ^ y;
y = x ^ y;
x = x ^ y;
//s = x - y;
//
int a, b;
a = 10;
b = 2;
a = b - a;//a=-8,b=10
b = b - a;//a=-8,b=10
a = b + a;//a=2,b=10
//
int c, d, temp;
c = 10;
d = 5;
temp = c;
c = d;
d = temp;