importCocoa// booleanvargameOver=falseprint(gameOver)gameOver.toggle()print(gameOver)// join stringvarname="john"+" "+"doe"// use string interpolationletfirstName="john"letlastName="doe"letage=25letfullName="full name is \(firstName)\(lastName), and he is \(age) years old"// check point/*
Creates a constant holding any temperature in Celsius.
Converts it to Fahrenheit by multiplying by 9, dividing by 5, then adding 32.
Prints the result for the user, showing both the Celsius and Fahrenheit values.
*/lettempC=21lettempF=tempC*9/5+32print("\(tempC) Celsius is \(tempF) in Fahrenheit")
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)