22 Swift Task Posted on 2019-11-25 Edited on 2019-12-03 In swift 123456789101112func plusAllDigits(_ number: Int) -> Int { var sum = 0 for digit in String(number) { sum += Int(String(digit))! } return sum}plusAllDigits(13413)// 12plusAllDigits(100000)// 1 1234567891011121314func isHarshad(_ number: Int) -> Bool { var sum = 0 for digit in String(number) { sum += Int(String(digit))! } return number % sum == 0}isHarshad(9)// trueisHarshad(777)// trueisHarshad(123)// false