daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Jun 21st, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/local/bin/ruby
  2. class Franc
  3.     def initialize(franc)
  4.         @euro = franc * 0.152449
  5.         @dollar = franc * 0.193877
  6.     end
  7. end
  8.  
  9. class Dollar
  10.     def initialize(dollar)
  11.         @euro = dollar * 0.78632
  12.         @franc = dollar * 5.15792
  13.     end
  14. end
  15.  
  16.  
  17. class Euro
  18.        def initialize(euro)
  19.            @dollar = euro * 1.27175
  20.            @franc = euro * 6.55957
  21.           puts "#{euro} Euro donne #{@dollar}$, et #{@franc}, Franc"
  22.        end
  23. end
  24.  
  25. Moneypocket = Euro.new(50)
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