Ad
  • Custom User Avatar

    Below code works fine in my IDE and when I give input as 3, its printing "Far". However, in the website, its shown nil output.

    def multiples(x)
    #Go on
    if x%49 == 0 and x%3 == 0
    puts "Fang"
    elsif x%7 == 0
    puts "fizz"
    elsif x%15 == 0
    puts "Foo"
    else
    puts "Far"
    end
    end