1 import Foundation 2 3 print("HelloSwift") 4 5 // 声明变量 6 var a = 1 7 var b = 2 8 a = 10 9 b = 20 10 11 // 常量 12 let c = a+b 13 14 15 var str = "Hello " 16 var s:String = "World" 17 var i:Int = 100 18 var words:String = "jinpangpang" 19 20 print(c) 21 print(str)