iOS Swift Collections and Control Flow Control Flow With Conditional Statements Working With Logical Operators

Scott Yoder
PRO
Scott Yoder
Pro Student 347 Points

doesnt work

r

operators.swift
var results: [Int] = []

for n in 1...100 {
    // Enter your code below
    if n/2 == false && n/7 == true {
      results.append(n)
    }

    // End code 
}

1 Answer

var results: [Int] = []

for n in 1...100 {
    // Enter your code below
    if n % 7 == 0 && n % 2 != 0 {
        results.append(n)
    }
}   
results.count