I need help with a conditional statement in Swift. I can'tfigure out how to make the output
Fantastic news! We've Found the answer you've been seeking!
Question:
I need help with a conditional statement in Swift. I can'tfigure out how to make the output differ based on user input. Ihave the code In question down below. Any help is appreciated.
print("what are 3 of your favorite movies?")
let movies = readLine()
print(" So your three favorite films are(movies)?" )
print("How old are you?")
let name = readLine()
var solution:Int?
if solution != nil {
print("you are an adult.")
} else {
print( "you are young.")
}
Related Book For
Fundamentals of Financial Accounting
ISBN: 978-0078025914
5th edition
Authors: Fred Phillips, Robert Libby, Patricia Libby
Posted Date: