Advertisement
Razzim

IOS lab2

Oct 30th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. //: Playground - noun: a place where people can play
  2.  
  3. import UIKit
  4.  
  5. enum Sestercje: Int
  6. {
  7. case aureus
  8. case denar
  9. case sesterc
  10. case dupondius
  11. case asy
  12. case semis
  13. }
  14.  
  15. var liczba :Int = 0
  16. var x :Int = 0
  17.  
  18. var waluta = Sestercje.sesterc
  19.  
  20. switch waluta
  21. {
  22. case .aureus:
  23. liczba += x*100
  24. case .denar:
  25. liczba += x*4
  26. case .sesterc:
  27. liczba += x/2
  28. case .dupondius:
  29. liczba += x/4
  30. case .asy:
  31. liczba += x/6
  32. case .semis:
  33. liczba += x/8
  34. }
  35.  
  36.  
  37.  
  38. var sakiewka:[(value: Int, name:String)] = [(1,"aureus"),(1,"denar"),(1,"sesterc"),(1,"dupondius"),(1,"asy"),(1,"semis")]
  39.  
  40.  
  41. func przelicz (sakiewka:[Int])
  42. {
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement