Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
19
Task/Compound-data-type/Swift/compound-data-type.swift
Normal file
19
Task/Compound-data-type/Swift/compound-data-type.swift
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Structure
|
||||
struct Point {
|
||||
var x:Int
|
||||
var y:Int
|
||||
}
|
||||
|
||||
// Tuple
|
||||
typealias PointTuple = (Int, Int)
|
||||
|
||||
// Class
|
||||
class PointClass {
|
||||
var x:Int!
|
||||
var y:Int!
|
||||
|
||||
init(x:Int, y:Int) {
|
||||
self.x = x
|
||||
self.y = y
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue