SHARE
TWEET

Untitled

Alex9090 Feb 21st, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //var s = "hello";
  2. var t = "world";
  3. //print(s + " " + t);
  4. //print ("s are \(s.count) caractere")
  5.  
  6.  
  7. /*if s.hasPrefix("He") {
  8.     print("Hello!");
  9. }
  10.  
  11. s.insert("a", at:s.endIndex)
  12.  */
  13. var s = 0;
  14. func suma(x:Int, y:Int) -> Int{
  15.    
  16.     s = x+y;
  17.     return s;
  18. }
  19. s=suma(x:5, y:7);
  20. print("Suma este \(s)")
  21.  
  22. var nr = "Hello"
  23. var.insert("!", at:nr.endIndex);
  24. var.insert("e", at:nr.Index(nr.startIndex, offsetBy:1));
  25. print(nr[nr.startIndex])
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
 
Top