Family Day update
This commit is contained in:
parent
aac6731f2c
commit
9ad63ea473
2442 changed files with 39761 additions and 8255 deletions
7
Task/User-input-Text/Crystal/user-input-text.crystal
Normal file
7
Task/User-input-Text/Crystal/user-input-text.crystal
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
puts "You entered: #{gets}"
|
||||
|
||||
begin
|
||||
puts "You entered: #{gets.not_nil!.chomp.to_i}"
|
||||
rescue ex
|
||||
puts ex
|
||||
end
|
||||
8
Task/User-input-Text/LOLCODE/user-input-text.lol
Normal file
8
Task/User-input-Text/LOLCODE/user-input-text.lol
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
HAI 1.4
|
||||
I HAS A string
|
||||
GIMMEH string
|
||||
I HAS A number
|
||||
GIMMEH number
|
||||
BTW converts number input to an integer
|
||||
MAEK number A NUMBR
|
||||
KTHXBYE
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
: example ( "- )
|
||||
remapping off
|
||||
"Enter a string: " puts 10 accept tib tempString
|
||||
[ "Enter 75000: " puts getToken toNumber 75000 = cr ] until
|
||||
"Your string was: '%s'\n" puts
|
||||
remapping on ;
|
||||
:example ("-)
|
||||
'Enter_a_string:_ s:put s:get s:keep
|
||||
[ 'Enter_75000:_ s:put s:get-word s:to-number nl #75000 eq? ] until
|
||||
'Your_string_was:_'%s'\n s:format s:put ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue