I am trying this :
print " Enter Value " num = gets.chomp
if num.is_a? Float print " Number is in float "
else num.is_a? Integer print " Number is in integer "
end
Aucun commentaire:
Enregistrer un commentaire