User input/Text: Difference between revisions

Content added Content deleted
m (move REXX to proper position)
m (do it right the first time :-()
Line 1,095: Line 1,095:
"Your string was: '%s'\n" puts
"Your string was: '%s'\n" puts
remapping on ;</lang>
remapping on ;</lang>

=={{header|Ruby}}==
{{works with|Ruby|1.8.4}}
<lang ruby>print "Enter a string: "
s = gets
print "Enter an integer: "
i = gets.to_i # If string entered, will return zero
puts "String = #{s}"
puts "Integer = #{i}"</lang>


=={{header|REXX}}==
=={{header|REXX}}==
Line 1,118: Line 1,109:


/*stick a fork in it, we're done.*/</lang>
/*stick a fork in it, we're done.*/</lang>

=={{header|Ruby}}==
{{works with|Ruby|1.8.4}}
<lang ruby>print "Enter a string: "
s = gets
print "Enter an integer: "
i = gets.to_i # If string entered, will return zero
puts "String = #{s}"
puts "Integer = #{i}"</lang>


=={{header|Scala}}==
=={{header|Scala}}==