diff --git a/pattern.swift b/pattern.swift new file mode 100644 index 0000000..5bf4709 --- /dev/null +++ b/pattern.swift @@ -0,0 +1,23 @@ +import Swift + +import Foundation + +var no = 1 +for i in 1...5 +{ + no = 1 + + for _ in 1..<(6-i) + { + print(" " , terminator : " ") + + } + for _ in 1...i{ + print("\(no)", terminator : " ") + no+=1 + } + for _ in 0...i{ + }// 3rd loop , what would be the conditions ? + print("\n") +} +