struct Temperature {↵
var celsius: Double↵
↵
var fahrenheit: Double {↵
get { celsius * 9 / 5 + 32 }↵
set { celsius = (newValue - 32) * 5 / 9 }↵
}↵
}↵
↵
var today = Temperature(celsius: 21)↵
today.fahrenheit += 9↵
print("It is \(today.celsius) degrees today.")
Click here or press any key to type