Answers for "let values = [3.0,6.0,9.0,1.0] let squares = values.map {$0 * $0} print(squares)"

0

let values = [3.0,6.0,9.0,1.0] let squares = values.map {$0 * $0} print(squares)

let values = [3.0,6.0,9.0,1.0]
let squares = values.map {$0 * $0}
print(squares)
Posted by: Guest on October-18-2020
0

let values = [3.0,6.0,9.0,1.0] let squares = values.map {$0 * $0} print(squares)

func sumSq(s: [Int]) -> Int {  return s.map{$0 * $0}.reduce(0, +)}
Posted by: Guest on October-18-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language