SHARE
TWEET

my first swift

a guest Sep 22nd, 2019 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //declaration of variables
  2. var wallet=250
  3. var neoHousband="Michel"
  4.  
  5. //print to screen
  6. print(wallet)
  7.  
  8. //print to screen with text
  9. var dealer="Gal"
  10. print ("my dealer name is:\(dealer) and i have in my wallet \(wallet)")
  11.  
  12. wallet -= 100
  13.  
  14. print (wallet)
  15.  
  16. //declaring special variable
  17. var מישל="neo"
  18.  
  19. print (מישל)
  20.  
  21. //declare a final
  22. let pi=3.1415
  23. print (pi)
  24.  
  25. //pi=6
  26.  
  27.  
  28. var x,y,z:Int
  29. x=5
  30. y=10
  31. z=x*y
  32. print ("\(x)*\(y)=\(z)\nקרציה")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top