Last active
March 17, 2020 08:15
-
-
Save IhwanID/4db9a2be0b7bf2617f6a2aefa972cfd3 to your computer and use it in GitHub Desktop.
Learn Swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| let name = "Ihwan" | |
| var age = 17 | |
| var isHungry: Bool = false | |
| let ๐ฎ๐ฉ: String = "Indonesia ๐ฎ๐ฉ" | |
| var height: Float = 168.0; | |
| print("Hi All \nmy name is \(name)! \ni'm from \(๐ฎ๐ฉ)") | |
| print("my name consists of \(name.count) characters") | |
| print("Nice to meet you all ๐๐ป") | |
| print("i'm \(age) y.o, next month i'll be \(age+1)") | |
| print("i was born in 2002") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import Foundation | |
| var friends = ["tama", "eko", "fadhil", "ihwan"] | |
| var age = ["17", "20", "23", "16"] | |
| var education = ["sd", "s1", "s3", "smp"] | |
| print("--- Family Card - Kartu Keluarga Kontrakan ---") | |
| print("-----------------------------------------") | |
| print(" No | Nama | Umur | Pendidikan") | |
| print("-----------------------------------------") | |
| for i in 0...3{ | |
| print("| \(i+1) | \(friends[i]) | \(age[i]) | \(education[i])" ) | |
| print("-----------------------------------------") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment