/*Copyright ElohimTov*/ /* //Name:ElohimTovSolve ConditionalStatements PHP Solution //Problem: HackerRank - 30 Days of Code - ConditionalStatements //Current File: ElohimTovSolve_CondStatements.(swift).txt //Compile-able File: ElohimTovSolve_CondStatements.swift //Dates: (Created 2/12/2019); 08/21/2021. //Tale: ElohimTov Solve's Solution to HackerRank.com's //Conditional Statements problem, in Swift programming language. //Problem link at https://elohimtov.com/elohimtov.info. */ import Foundation //input integer N guard let N = Int((readLine()?.trimmingCharacters(in: .whitespacesAndNewlines))!) else { fatalError("Bad input") } //define constants used let one: Int = 1 let two: Int = 2 let five: Int = 5 let six: Int = 6 let twenty: Int = 20 if (N%two) == one { print("Weird") } else if two<=N && N<=five { print("Not Weird") } else if six<=N && N<=twenty { print("Weird") } else //if N>twenty { print("Not Weird") }//ends if/else statement /*Copyright ElohimTov*/