Page 209

Swift

var no1 = 1 while multtable > 0 { no1 *= 10 --multtable } return (self / no1) % 10 } }

println(12[0]) println(7869[1]) println(786543[2]) When we run the above program using playground, we get the following result: 2 6 5

Nested Types Nested types for class, structure and enumeration instances can also be extended with the help of extensions. extension Int { enum calc { case add case sub case mult case div case anything }

var print: calc { switch self { case 0: 197

​Quick is a effective and user-friendly coding language for macOS, iOS, watchOS and tvOS....  

...

Read more
Read more
Similar to
Popular now
Just for you