User input/Text: Difference between revisions
m
do it right the first time :-(
Walterpachl (talk | contribs) m (move REXX to proper position) |
Walterpachl (talk | contribs) m (do it right the first time :-() |
||
Line 1,095:
"Your string was: '%s'\n" puts
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}}==
Line 1,118 ⟶ 1,109:
/*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}}==
|