0
Error
What I have to change to leave the error;? https://code.sololearn.com/c63drhXDdlGh/?ref=app
1 Réponse
0
ruby failed to compare a number to a string (they're just incompatible data types)
and "gets" method always gives you a string (something like "8", which is not the number 8).
so in order to compare the user's input to a number, you have to convert it to a number first by using the "String::to_i" method ( change line 3 from " a=gets" to "a=gets.to_i".