Day 2 of #100DaysOfSwiftUI, this is my solution to checkpoint 1. The rules are to create a constant holding any temperature in Celsius, convert it to Fahrenheit, and then print out both values. I used explicit type definition for the constants, so I didn’t have to remember to add a decimal to the Celsius temperature. This isn’t covered yet in the 2 days we’ve done so far, so I’m cheating a bit, but it is what it is.
import Cocoa
let celsius: Double = -11
let fahrenheit: Double = ((celsius * 9) / 5) + 32
print("\(celsius)°C is \(fahrenheit)°F")
🎉 I just finished Day 2 of the #100DaysOfSwiftUI at https://hackingwithswift.com/100/swiftui/2 via @twostraws