September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,6 +1,9 @@
print "Enter a string: "
s = gets
print "Enter an integer: "
printf "Enter an integer: "
i = gets.to_i # If string entered, will return zero
printf "Enter a real number: "
f = Float(gets) rescue nil # converts a floating point number or returns nil
puts "String = #{s}"
puts "Integer = #{i}"
puts "Float = #{f}"