Skip to content

Instantly share code, notes, and snippets.

@wicky-andrian
Created April 23, 2020 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wicky-andrian/fa59ba35341fdc0dba77c3b0f0c9bc2d to your computer and use it in GitHub Desktop.
Save wicky-andrian/fa59ba35341fdc0dba77c3b0f0c9bc2d to your computer and use it in GitHub Desktop.
Metode string part 6
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