Created
April 23, 2020 16:30
-
-
Save wicky-andrian/fa59ba35341fdc0dba77c3b0f0c9bc2d to your computer and use it in GitHub Desktop.
Metode string part 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = "1234.567" | |
puts a | |
puts "Kelas awal #{a.class}" | |
b = a.to_f | |
puts b | |
puts "Kelas b #{b.class}" | |
c = "abc.1234" | |
puts c | |
puts "Setelah di konversi" | |
puts "c yang di sertakan salah hasil: #{c.to_f}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment