Swift - Nested for in loop

Introduction

You can nest a For-In loop within another For-In loop:

Demo

//Nested Loop
for i in 1...10{//from   w  ww. j  a  v  a  2 s .  c  o m
   for j in 1...10 {
      print("\(i) x \(j) = \(i*j)")
   }
   print("")
}

Result

Related Topic