Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //swift
- //currency converter
- func poundsToBaht(rate:Int, pounds:Int) -> String{
- let baht = rate*pounds
- return "£\(pounds) is \(baht) baht."
- }
- func bahtToPounds(rate:Int, baht:Int) -> String{
- let pounds = baht/rate
- return "\(baht) baht is £\(pounds)."
- }
- poundsToBaht(51, 3000)
- bahtToPounds(51, 660000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement