var a = 10
binaryPrintIntNumber(num: a)
print(a)
//交换两个实参的数值
func swap(a: inout Int , b:inout Int){
//交换数值
let temp = a
a = b
b = temp
}
var x = 20 , y = 30
swap(a:&x , b:&y)
//打印结果
print(x,y)
var a = 10
binaryPrintIntNumber(num: a)
print(a)
//交换两个实参的数值
func swap(a: inout Int , b:inout Int){
//交换数值
let temp = a
a = b
b = temp
}
var x = 20 , y = 30
swap(a:&x , b:&y)
//打印结果
print(x,y)