import Foundation
print("Enter a number: ", terminator: "")
if let input = readLine(), let num = Int(input) {
if num % 2 == 0 {
print("The number is Even.")
} else {
print("The number is Odd.")
}
} else {
print("Invalid input!")
}
import Foundation
let num = 10
if num % 2 == 0 {
print("The number is Even.")
} else {
print("The number is Odd.")
}