+ 1
Argumenterror
What is argument error in Ruby?
14 Answers
+ 6
@Sadiqul Sakif My pleasure, if it doesnt work, give me the code and the errors I'll fix it out
+ 6
:D
+ 6
It worked on me
+ 5
The correct code should be:
puts "please enter your age"
age = gets.to_i
puts "age"
if age > 16
puts "you're welcome'"
end
+ 5
gets -> Get the user input
.to_i -> Convert the user input to integer
+ 3
You made an error in parameters, either less or more
+ 1
ow, I have to check that thanks
+ 1
I can't compete it, and what I have been written last time not seen saved
+ 1
would you please tell me why "gets.to_i"
+ 1
ok, I'm trying thanks again
+ 1
it didn't work
didn't show age and not saying welcome
+ 1
https://code.sololearn.com/czF7wiMeep6G
check it out
0
ow, :( I can't complete



