import Foundation import Glibc // Size of the pattern let num = 3 // Outer for loop is used to handle the // total number of rows in upper half // diamond binary pattern for m in 1...num { // Printing upper half diamond binary pattern for n in 1...m { if n % 2 == 0 ...